Re: [PATCH v3 1/1] binder: transaction latency tracking for user build
From: Greg Kroah-Hartman
Date: Thu Apr 30 2020 - 04:51:10 EST
On Thu, Apr 30, 2020 at 04:13:59PM +0800, Frankie Chang wrote:
> Record start/end timestamp for binder transaction.
> When transaction is completed or transaction is free,
> it would be checked if transaction latency over threshold (2 sec),
> if yes, printing related information for tracing.
>
> /* Implement details */
> - Add tracepoint/trace at free transaction.
> Since the original trace_binder_transaction_received cannot
> precisely present the real finished time of transaction, adding a
> trace_binder_free_transaction at the point of free transaction
> may be more close to it.
>
> - Add latency tracer module to monitor slow transaction.
> The trace_binder_free_transaction would not be enabled
> by default. Monitoring which transaction is too slow to
> cause some of exceptions is important. So we hook the
> tracepoint to call the monitor function.
>
> - Move some struct from core file to header file.
> Need some struct defined in core file in latency trace module
> In addition, moving all structs to header file makes module
> more extendable, and make all these strcuts to be defined
> in the same file.
Also, this should be split up into a patch series, the first moving
things around, and the rest of the patches each adding a single feature.
As it is, this patch is almost impossible to review.
thanks,
greg k-h