2020-07-28 03:20:37

by Frankie Chang

[permalink] [raw]
Subject: [PATCH v6 2/3] binder: add trace at free transaction.

From: "Frankie.Chang" <[email protected]>

Since the original trace_binder_transaction_received cannot
precisely present the real finished time of transaction, adding a
trace_binder_txn_latency_free at the point of free transaction
may be more close to it.

Signed-off-by: Frankie.Chang <[email protected]>
---
drivers/android/binder.c | 6 ++++++
drivers/android/binder_trace.h | 27 +++++++++++++++++++++++++++
2 files changed, 33 insertions(+)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 2df146f..1e6fc40 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -1522,6 +1522,9 @@ static void binder_free_transaction(struct binder_transaction *t)
* If the transaction has no target_proc, then
* t->buffer->transaction has already been cleared.
*/
+ spin_lock(&t->lock);
+ trace_binder_txn_latency_free(t);
+ spin_unlock(&t->lock);
binder_free_txn_fixups(t);
kfree(t);
binder_stats_deleted(BINDER_STAT_TRANSACTION);
@@ -3093,6 +3096,9 @@ static void binder_transaction(struct binder_proc *proc,
kfree(tcomplete);
binder_stats_deleted(BINDER_STAT_TRANSACTION_COMPLETE);
err_alloc_tcomplete_failed:
+ spin_lock(&t->lock);
+ trace_binder_txn_latency_free(t);
+ spin_unlock(&t->lock);
kfree(t);
binder_stats_deleted(BINDER_STAT_TRANSACTION);
err_alloc_t_failed:
diff --git a/drivers/android/binder_trace.h b/drivers/android/binder_trace.h
index 6731c3c..8ac87d1 100644
--- a/drivers/android/binder_trace.h
+++ b/drivers/android/binder_trace.h
@@ -95,6 +95,33 @@
__entry->thread_todo)
);

+TRACE_EVENT(binder_txn_latency_free,
+ TP_PROTO(struct binder_transaction *t),
+ TP_ARGS(t),
+ TP_STRUCT__entry(
+ __field(int, debug_id)
+ __field(int, from_proc)
+ __field(int, from_thread)
+ __field(int, to_proc)
+ __field(int, to_thread)
+ __field(unsigned int, code)
+ __field(unsigned int, flags)
+ ),
+ TP_fast_assign(
+ __entry->debug_id = t->debug_id;
+ __entry->from_proc = t->from ? t->from->proc->pid : 0;
+ __entry->from_thread = t->from ? t->from->pid : 0;
+ __entry->to_proc = t->to_proc ? t->to_proc->pid : 0;
+ __entry->to_thread = t->to_thread ? t->to_thread->pid : 0;
+ __entry->code = t->code;
+ __entry->flags = t->flags;
+ ),
+ TP_printk("transaction=%d from %d:%d to %d:%d flags=0x%x code=0x%x",
+ __entry->debug_id, __entry->from_proc, __entry->from_thread,
+ __entry->to_proc, __entry->to_thread, __entry->code,
+ __entry->flags)
+);
+
TRACE_EVENT(binder_transaction,
TP_PROTO(bool reply, struct binder_transaction *t,
struct binder_node *target_node),
--
1.7.9.5


2020-07-31 18:52:37

by Todd Kjos

[permalink] [raw]
Subject: Re: [PATCH v6 2/3] binder: add trace at free transaction.

On Mon, Jul 27, 2020 at 8:28 PM Frankie Chang
<[email protected]> wrote:
>
> From: "Frankie.Chang" <[email protected]>
>
> Since the original trace_binder_transaction_received cannot
> precisely present the real finished time of transaction, adding a
> trace_binder_txn_latency_free at the point of free transaction
> may be more close to it.
>
> Signed-off-by: Frankie.Chang <[email protected]>
> ---
> drivers/android/binder.c | 6 ++++++
> drivers/android/binder_trace.h | 27 +++++++++++++++++++++++++++
> 2 files changed, 33 insertions(+)
>
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index 2df146f..1e6fc40 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -1522,6 +1522,9 @@ static void binder_free_transaction(struct binder_transaction *t)
> * If the transaction has no target_proc, then
> * t->buffer->transaction has already been cleared.
> */
> + spin_lock(&t->lock);
> + trace_binder_txn_latency_free(t);
> + spin_unlock(&t->lock);

Hmm. I don't prefer taking the lock just to call a trace. It doesn't
make clear why the lock has to be taken. I'd prefer something like:

if (trace_binder_txn_latency_free_enabled()) {
int to_proc, to_thread;

spin_lock(&t->lock);
to_proc = t->to_proc ? t->to_proc->pid : 0;
to_thread = t->to_thread ? t->to_thread->pid : 0;
spin_unlock(&t->lock);
trace_binder_txn_latency_free(t, to_proc, to_pid);
}

And then the trace would use the passed-in values instead of accessing
via t->to_proc/to_thread.

> binder_free_txn_fixups(t);
> kfree(t);
> binder_stats_deleted(BINDER_STAT_TRANSACTION);
> @@ -3093,6 +3096,9 @@ static void binder_transaction(struct binder_proc *proc,
> kfree(tcomplete);
> binder_stats_deleted(BINDER_STAT_TRANSACTION_COMPLETE);
> err_alloc_tcomplete_failed:
> + spin_lock(&t->lock);
> + trace_binder_txn_latency_free(t);
> + spin_unlock(&t->lock);
> kfree(t);
> binder_stats_deleted(BINDER_STAT_TRANSACTION);
> err_alloc_t_failed:
> diff --git a/drivers/android/binder_trace.h b/drivers/android/binder_trace.h
> index 6731c3c..8ac87d1 100644
> --- a/drivers/android/binder_trace.h
> +++ b/drivers/android/binder_trace.h
> @@ -95,6 +95,33 @@
> __entry->thread_todo)
> );
>
> +TRACE_EVENT(binder_txn_latency_free,
> + TP_PROTO(struct binder_transaction *t),
> + TP_ARGS(t),
> + TP_STRUCT__entry(
> + __field(int, debug_id)
> + __field(int, from_proc)
> + __field(int, from_thread)
> + __field(int, to_proc)
> + __field(int, to_thread)
> + __field(unsigned int, code)
> + __field(unsigned int, flags)
> + ),
> + TP_fast_assign(
> + __entry->debug_id = t->debug_id;
> + __entry->from_proc = t->from ? t->from->proc->pid : 0;
> + __entry->from_thread = t->from ? t->from->pid : 0;
> + __entry->to_proc = t->to_proc ? t->to_proc->pid : 0;
> + __entry->to_thread = t->to_thread ? t->to_thread->pid : 0;
> + __entry->code = t->code;
> + __entry->flags = t->flags;
> + ),
> + TP_printk("transaction=%d from %d:%d to %d:%d flags=0x%x code=0x%x",
> + __entry->debug_id, __entry->from_proc, __entry->from_thread,
> + __entry->to_proc, __entry->to_thread, __entry->code,
> + __entry->flags)
> +);
> +
> TRACE_EVENT(binder_transaction,
> TP_PROTO(bool reply, struct binder_transaction *t,
> struct binder_node *target_node),
> --
> 1.7.9.5

2020-08-03 03:14:41

by Frankie Chang

[permalink] [raw]
Subject: Re: [PATCH v6 2/3] binder: add trace at free transaction.

On Fri, 2020-07-31 at 11:50 -0700, Todd Kjos wrote:
> On Mon, Jul 27, 2020 at 8:28 PM Frankie Chang
> <[email protected]> wrote:
> >
> > From: "Frankie.Chang" <[email protected]>
> >
> > Since the original trace_binder_transaction_received cannot
> > precisely present the real finished time of transaction, adding a
> > trace_binder_txn_latency_free at the point of free transaction
> > may be more close to it.
> >
> > Signed-off-by: Frankie.Chang <[email protected]>
> > ---
> > drivers/android/binder.c | 6 ++++++
> > drivers/android/binder_trace.h | 27 +++++++++++++++++++++++++++
> > 2 files changed, 33 insertions(+)
> >
> > diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> > index 2df146f..1e6fc40 100644
> > --- a/drivers/android/binder.c
> > +++ b/drivers/android/binder.c
> > @@ -1522,6 +1522,9 @@ static void binder_free_transaction(struct binder_transaction *t)
> > * If the transaction has no target_proc, then
> > * t->buffer->transaction has already been cleared.
> > */
> > + spin_lock(&t->lock);
> > + trace_binder_txn_latency_free(t);
> > + spin_unlock(&t->lock);
>
> Hmm. I don't prefer taking the lock just to call a trace. It doesn't
> make clear why the lock has to be taken. I'd prefer something like:
>
> if (trace_binder_txn_latency_free_enabled()) {
c
> }
>
> And then the trace would use the passed-in values instead of accessing
> via t->to_proc/to_thread.
>
Then we still add lock protection in the hook function, when trace is
disable ?

Or we also pass these to hook function, no matter the trace is enable or
not.I think this way is more clear that the lock protects @from,
@to_proc and @to_thread.Then, there is no need to add the lock in hook
function.

int from_proc, from_thread, to_proc, to_thread;

spin_lock(&t->lock);
from_proc = t->from ? t->from->proc->pid : 0;
from_thread = t->from ? t->from->pid :0;
to_proc = t->to_proc ? t->to_proc->pid : 0;
to_thread = t->to_thread ? t->to_thread->pid : 0;
spin_unlock(&t->lock);
trace_binder_txn_latency_free(t, from_proc, from_thread, to_proc,
to_pid);

> > binder_free_txn_fixups(t);
> > kfree(t);
> > binder_stats_deleted(BINDER_STAT_TRANSACTION);
> > @@ -3093,6 +3096,9 @@ static void binder_transaction(struct binder_proc *proc,
> > kfree(tcomplete);
> > binder_stats_deleted(BINDER_STAT_TRANSACTION_COMPLETE);
> > err_alloc_tcomplete_failed:
> > + spin_lock(&t->lock);
> > + trace_binder_txn_latency_free(t);
> > + spin_unlock(&t->lock);
> > kfree(t);
> > binder_stats_deleted(BINDER_STAT_TRANSACTION);
> > err_alloc_t_failed:
> > diff --git a/drivers/android/binder_trace.h b/drivers/android/binder_trace.h
> > index 6731c3c..8ac87d1 100644
> > --- a/drivers/android/binder_trace.h
> > +++ b/drivers/android/binder_trace.h
> > @@ -95,6 +95,33 @@
> > __entry->thread_todo)
> > );
> >
> > +TRACE_EVENT(binder_txn_latency_free,
> > + TP_PROTO(struct binder_transaction *t),
> > + TP_ARGS(t),
> > + TP_STRUCT__entry(
> > + __field(int, debug_id)
> > + __field(int, from_proc)
> > + __field(int, from_thread)
> > + __field(int, to_proc)
> > + __field(int, to_thread)
> > + __field(unsigned int, code)
> > + __field(unsigned int, flags)
> > + ),
> > + TP_fast_assign(
> > + __entry->debug_id = t->debug_id;
> > + __entry->from_proc = t->from ? t->from->proc->pid : 0;
> > + __entry->from_thread = t->from ? t->from->pid : 0;
> > + __entry->to_proc = t->to_proc ? t->to_proc->pid : 0;
> > + __entry->to_thread = t->to_thread ? t->to_thread->pid : 0;
> > + __entry->code = t->code;
> > + __entry->flags = t->flags;
> > + ),
> > + TP_printk("transaction=%d from %d:%d to %d:%d flags=0x%x code=0x%x",
> > + __entry->debug_id, __entry->from_proc, __entry->from_thread,
> > + __entry->to_proc, __entry->to_thread, __entry->code,
> > + __entry->flags)
> > +);
> > +
> > TRACE_EVENT(binder_transaction,
> > TP_PROTO(bool reply, struct binder_transaction *t,
> > struct binder_node *target_node),
> > --
> > 1.7.9.5

2020-08-03 15:13:53

by Todd Kjos

[permalink] [raw]
Subject: Re: [PATCH v6 2/3] binder: add trace at free transaction.

On Sun, Aug 2, 2020 at 8:11 PM Frankie Chang <[email protected]> wrote:
>
> On Fri, 2020-07-31 at 11:50 -0700, Todd Kjos wrote:
> > On Mon, Jul 27, 2020 at 8:28 PM Frankie Chang
> > <[email protected]> wrote:
> > >
> > > From: "Frankie.Chang" <[email protected]>
> > >
> > > Since the original trace_binder_transaction_received cannot
> > > precisely present the real finished time of transaction, adding a
> > > trace_binder_txn_latency_free at the point of free transaction
> > > may be more close to it.
> > >
> > > Signed-off-by: Frankie.Chang <[email protected]>
> > > ---
> > > drivers/android/binder.c | 6 ++++++
> > > drivers/android/binder_trace.h | 27 +++++++++++++++++++++++++++
> > > 2 files changed, 33 insertions(+)
> > >
> > > diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> > > index 2df146f..1e6fc40 100644
> > > --- a/drivers/android/binder.c
> > > +++ b/drivers/android/binder.c
> > > @@ -1522,6 +1522,9 @@ static void binder_free_transaction(struct binder_transaction *t)
> > > * If the transaction has no target_proc, then
> > > * t->buffer->transaction has already been cleared.
> > > */
> > > + spin_lock(&t->lock);
> > > + trace_binder_txn_latency_free(t);
> > > + spin_unlock(&t->lock);
> >
> > Hmm. I don't prefer taking the lock just to call a trace. It doesn't
> > make clear why the lock has to be taken. I'd prefer something like:
> >
> > if (trace_binder_txn_latency_free_enabled()) {
> c
> > }
> >
> > And then the trace would use the passed-in values instead of accessing
> > via t->to_proc/to_thread.
> >
> Then we still add lock protection in the hook function, when trace is
> disable ?

I don't understand... in the example I gave, the trace doesn't get
called if disabled. What do you mean to "add lock protection when the
trace is disabled()"?

>
> Or we also pass these to hook function, no matter the trace is enable or

What do you mean by "hook" function? If something has attached to the
trace, then xxx_enabled() will return true.

> not.I think this way is more clear that the lock protects @from,
> @to_proc and @to_thread.Then, there is no need to add the lock in hook
> function.

Why is it clearer (other than the fact that I missed including t->from
under the lock)?

>
> int from_proc, from_thread, to_proc, to_thread;
>
> spin_lock(&t->lock);
> from_proc = t->from ? t->from->proc->pid : 0;
> from_thread = t->from ? t->from->pid :0;
> to_proc = t->to_proc ? t->to_proc->pid : 0;
> to_thread = t->to_thread ? t->to_thread->pid : 0;
> spin_unlock(&t->lock);
> trace_binder_txn_latency_free(t, from_proc, from_thread, to_proc,
> to_pid);

The main feedback is I'd like to see the fields dereferenced in the
same context as the lock acquisition instead of acquiring the lock and
calling the trace function, so this code would be fine. There will be
very little contention for t->lock so using xxx_enabled() is optional.

Since trace_binder_txn_latency_free() is called twice, it would make
sense to have a helper function to do the above.

>
> > > binder_free_txn_fixups(t);
> > > kfree(t);
> > > binder_stats_deleted(BINDER_STAT_TRANSACTION);
> > > @@ -3093,6 +3096,9 @@ static void binder_transaction(struct binder_proc *proc,
> > > kfree(tcomplete);
> > > binder_stats_deleted(BINDER_STAT_TRANSACTION_COMPLETE);
> > > err_alloc_tcomplete_failed:
> > > + spin_lock(&t->lock);
> > > + trace_binder_txn_latency_free(t);
> > > + spin_unlock(&t->lock);
> > > kfree(t);
> > > binder_stats_deleted(BINDER_STAT_TRANSACTION);
> > > err_alloc_t_failed:
> > > diff --git a/drivers/android/binder_trace.h b/drivers/android/binder_trace.h
> > > index 6731c3c..8ac87d1 100644
> > > --- a/drivers/android/binder_trace.h
> > > +++ b/drivers/android/binder_trace.h
> > > @@ -95,6 +95,33 @@
> > > __entry->thread_todo)
> > > );
> > >
> > > +TRACE_EVENT(binder_txn_latency_free,
> > > + TP_PROTO(struct binder_transaction *t),
> > > + TP_ARGS(t),
> > > + TP_STRUCT__entry(
> > > + __field(int, debug_id)
> > > + __field(int, from_proc)
> > > + __field(int, from_thread)
> > > + __field(int, to_proc)
> > > + __field(int, to_thread)
> > > + __field(unsigned int, code)
> > > + __field(unsigned int, flags)
> > > + ),
> > > + TP_fast_assign(
> > > + __entry->debug_id = t->debug_id;
> > > + __entry->from_proc = t->from ? t->from->proc->pid : 0;
> > > + __entry->from_thread = t->from ? t->from->pid : 0;
> > > + __entry->to_proc = t->to_proc ? t->to_proc->pid : 0;
> > > + __entry->to_thread = t->to_thread ? t->to_thread->pid : 0;
> > > + __entry->code = t->code;
> > > + __entry->flags = t->flags;
> > > + ),
> > > + TP_printk("transaction=%d from %d:%d to %d:%d flags=0x%x code=0x%x",
> > > + __entry->debug_id, __entry->from_proc, __entry->from_thread,
> > > + __entry->to_proc, __entry->to_thread, __entry->code,
> > > + __entry->flags)
> > > +);
> > > +
> > > TRACE_EVENT(binder_transaction,
> > > TP_PROTO(bool reply, struct binder_transaction *t,
> > > struct binder_node *target_node),
> > > --
> > > 1.7.9.5
>

2020-08-04 02:46:33

by Frankie Chang

[permalink] [raw]
Subject: Re: [PATCH v6 2/3] binder: add trace at free transaction.

On Mon, 2020-08-03 at 08:12 -0700, Todd Kjos wrote:
> On Sun, Aug 2, 2020 at 8:11 PM Frankie Chang <[email protected]> wrote:
> >
> > On Fri, 2020-07-31 at 11:50 -0700, Todd Kjos wrote:
> > > On Mon, Jul 27, 2020 at 8:28 PM Frankie Chang
> > > <[email protected]> wrote:
> > > >
> > > > From: "Frankie.Chang" <[email protected]>
> > > >
> > > > Since the original trace_binder_transaction_received cannot
> > > > precisely present the real finished time of transaction, adding a
> > > > trace_binder_txn_latency_free at the point of free transaction
> > > > may be more close to it.
> > > >
> > > > Signed-off-by: Frankie.Chang <[email protected]>
> > > > ---
> > > > drivers/android/binder.c | 6 ++++++
> > > > drivers/android/binder_trace.h | 27 +++++++++++++++++++++++++++
> > > > 2 files changed, 33 insertions(+)
> > > >
> > > > diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> > > > index 2df146f..1e6fc40 100644
> > > > --- a/drivers/android/binder.c
> > > > +++ b/drivers/android/binder.c
> > > > @@ -1522,6 +1522,9 @@ static void binder_free_transaction(struct binder_transaction *t)
> > > > * If the transaction has no target_proc, then
> > > > * t->buffer->transaction has already been cleared.
> > > > */
> > > > + spin_lock(&t->lock);
> > > > + trace_binder_txn_latency_free(t);
> > > > + spin_unlock(&t->lock);
> > >
> > > Hmm. I don't prefer taking the lock just to call a trace. It doesn't
> > > make clear why the lock has to be taken. I'd prefer something like:
> > >
> > > if (trace_binder_txn_latency_free_enabled()) {
> > c
> > > }
> > >
> > > And then the trace would use the passed-in values instead of accessing
> > > via t->to_proc/to_thread.
> > >
> > Then we still add lock protection in the hook function, when trace is
> > disable ?
>
> I don't understand... in the example I gave, the trace doesn't get
> called if disabled. What do you mean to "add lock protection when the
> trace is disabled()"?
>
> >
> > Or we also pass these to hook function, no matter the trace is enable or
>
> What do you mean by "hook" function? If something has attached to the
> trace, then xxx_enabled() will return true.
>
I'm sorry for that I misunderstand this XXX_enabled().

> > not.I think this way is more clear that the lock protects @from,
> > @to_proc and @to_thread.Then, there is no need to add the lock in hook
> > function.
>
> Why is it clearer (other than the fact that I missed including t->from
> under the lock)?
>
I think your example is clear enough.

> >
> > int from_proc, from_thread, to_proc, to_thread;
> >
> > spin_lock(&t->lock);
> > from_proc = t->from ? t->from->proc->pid : 0;
> > from_thread = t->from ? t->from->pid :0;
> > to_proc = t->to_proc ? t->to_proc->pid : 0;
> > to_thread = t->to_thread ? t->to_thread->pid : 0;
> > spin_unlock(&t->lock);
> > trace_binder_txn_latency_free(t, from_proc, from_thread, to_proc,
> > to_pid);
>
> The main feedback is I'd like to see the fields dereferenced in the
> same context as the lock acquisition instead of acquiring the lock and
> calling the trace function, so this code would be fine. There will be
> very little contention for t->lock so using xxx_enabled() is optional.
>
> Since trace_binder_txn_latency_free() is called twice, it would make
> sense to have a helper function to do the above.
>
Okay, I will make a helper function to do this in next version patch.
Very thanks for your help for this.

> >
> > > > binder_free_txn_fixups(t);
> > > > kfree(t);
> > > > binder_stats_deleted(BINDER_STAT_TRANSACTION);
> > > > @@ -3093,6 +3096,9 @@ static void binder_transaction(struct binder_proc *proc,
> > > > kfree(tcomplete);
> > > > binder_stats_deleted(BINDER_STAT_TRANSACTION_COMPLETE);
> > > > err_alloc_tcomplete_failed:
> > > > + spin_lock(&t->lock);
> > > > + trace_binder_txn_latency_free(t);
> > > > + spin_unlock(&t->lock);
> > > > kfree(t);
> > > > binder_stats_deleted(BINDER_STAT_TRANSACTION);
> > > > err_alloc_t_failed:
> > > > diff --git a/drivers/android/binder_trace.h b/drivers/android/binder_trace.h
> > > > index 6731c3c..8ac87d1 100644
> > > > --- a/drivers/android/binder_trace.h
> > > > +++ b/drivers/android/binder_trace.h
> > > > @@ -95,6 +95,33 @@
> > > > __entry->thread_todo)
> > > > );
> > > >
> > > > +TRACE_EVENT(binder_txn_latency_free,
> > > > + TP_PROTO(struct binder_transaction *t),
> > > > + TP_ARGS(t),
> > > > + TP_STRUCT__entry(
> > > > + __field(int, debug_id)
> > > > + __field(int, from_proc)
> > > > + __field(int, from_thread)
> > > > + __field(int, to_proc)
> > > > + __field(int, to_thread)
> > > > + __field(unsigned int, code)
> > > > + __field(unsigned int, flags)
> > > > + ),
> > > > + TP_fast_assign(
> > > > + __entry->debug_id = t->debug_id;
> > > > + __entry->from_proc = t->from ? t->from->proc->pid : 0;
> > > > + __entry->from_thread = t->from ? t->from->pid : 0;
> > > > + __entry->to_proc = t->to_proc ? t->to_proc->pid : 0;
> > > > + __entry->to_thread = t->to_thread ? t->to_thread->pid : 0;
> > > > + __entry->code = t->code;
> > > > + __entry->flags = t->flags;
> > > > + ),
> > > > + TP_printk("transaction=%d from %d:%d to %d:%d flags=0x%x code=0x%x",
> > > > + __entry->debug_id, __entry->from_proc, __entry->from_thread,
> > > > + __entry->to_proc, __entry->to_thread, __entry->code,
> > > > + __entry->flags)
> > > > +);
> > > > +
> > > > TRACE_EVENT(binder_transaction,
> > > > TP_PROTO(bool reply, struct binder_transaction *t,
> > > > struct binder_node *target_node),
> > > > --
> > > > 1.7.9.5
> >

2020-08-04 14:07:26

by Frankie Chang

[permalink] [raw]
Subject: [PATCH v7] binder: transaction latency tracking for user build


Frankie.Chang (3):
binder: move structs from core file to header file
binder: add trace at free transaction.
binder: add transaction latency tracer

drivers/android/Kconfig | 8 +
drivers/android/Makefile | 1 +
drivers/android/binder.c | 425 ++-----------------------------
drivers/android/binder_internal.h | 417 ++++++++++++++++++++++++++++++
drivers/android/binder_latency_tracer.c | 112 ++++++++
drivers/android/binder_trace.h | 49 ++++
6 files changed, 607 insertions(+), 405 deletions(-) create mode 100644 drivers/android/binder_latency_tracer.c

Change from v7:
- Use the passed-in values instead of accessing via t->from/to_proc/to_thread
for trace_binder_txn_latency_free, when trace_binder_txn_latency_free_enable() return true.
- make a helper function to do the above.

Change from v6:
- change CONFIG_BINDER_TRANSACTION_LATENCY_TRACKING type from bool to tristate
- add comments to @timestamp and @tv under struct binder_transaction
- make binder_txn_latency threshold configurable
- enhance lock protection

Change from v5:
- change config name to the proper one, CONFIG_BINDER_TRANSACTION_LATENCY_TRACKING.
- change tracepoint name to more descriptive one, trace_binder_txn_latency_(alloc|info|free)
- enhance some lock protection.

Change from v4:
- split up into patch series.

Change from v3:
- use tracepoints for binder_update_info and print_binder_transaction_ext,
instead of custom registration functions.

Change from v2:
- create transaction latency module to monitor slow transaction.

Change from v1:
- first patchset.

2020-09-03 16:21:54

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v7] binder: transaction latency tracking for user build

On Tue, Aug 04, 2020 at 09:59:09PM +0800, Frankie Chang wrote:
>
> Frankie.Chang (3):
> binder: move structs from core file to header file
> binder: add trace at free transaction.
> binder: add transaction latency tracer
>
> drivers/android/Kconfig | 8 +
> drivers/android/Makefile | 1 +
> drivers/android/binder.c | 425 ++-----------------------------
> drivers/android/binder_internal.h | 417 ++++++++++++++++++++++++++++++
> drivers/android/binder_latency_tracer.c | 112 ++++++++
> drivers/android/binder_trace.h | 49 ++++
> 6 files changed, 607 insertions(+), 405 deletions(-) create mode 100644 drivers/android/binder_latency_tracer.c

This series blows up the build into lots of tiny pieces, how was it
tested?

Here's my error logs:

In file included from drivers/android/binderfs.c:37:
drivers/android/binder_internal.h:537:17: error: field ‘tv’ has incomplete type
537 | struct timeval tv;
| ^~
In file included from drivers/android/binder_trace.h:12,
from drivers/android/binder_alloc.c:27:
drivers/android/binder_trace.h: In function ‘trace_binder_txn_latency_alloc’:
drivers/android/binder_trace.h:100:13: error: ‘e’ undeclared (first use in this function)
100 | TP_ARGS(t, e)
| ^
./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
191 | ((void(*)(proto))(it_func))(args); \
| ^~~~
./include/linux/tracepoint.h:236:5: note: in expansion of macro ‘TP_ARGS’
236 | TP_ARGS(data_args), \
| ^~~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
378 | PARAMS(__data, args))
| ^~~~~~
drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
98 | DECLARE_TRACE(binder_txn_latency_alloc,
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
100 | TP_ARGS(t, e)
| ^~~~~~~
drivers/android/binder_trace.h:100:13: note: each undeclared identifier is reported only once for each function it appears in
100 | TP_ARGS(t, e)
| ^
./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
191 | ((void(*)(proto))(it_func))(args); \
| ^~~~
./include/linux/tracepoint.h:236:5: note: in expansion of macro ‘TP_ARGS’
236 | TP_ARGS(data_args), \
| ^~~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
378 | PARAMS(__data, args))
| ^~~~~~
drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
98 | DECLARE_TRACE(binder_txn_latency_alloc,
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
100 | TP_ARGS(t, e)
| ^~~~~~~
./include/linux/tracepoint.h:191:6: error: too many arguments to function ‘(void (*)(void *, struct binder_transaction *))it_func’
191 | ((void(*)(proto))(it_func))(args); \
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/tracepoint.h:234:4: note: in expansion of macro ‘__DO_TRACE’
234 | __DO_TRACE(&__tracepoint_##name, \
| ^~~~~~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
98 | DECLARE_TRACE(binder_txn_latency_alloc,
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h: In function ‘trace_binder_txn_latency_alloc_rcuidle’:
drivers/android/binder_trace.h:100:13: error: ‘e’ undeclared (first use in this function)
100 | TP_ARGS(t, e)
| ^
./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
191 | ((void(*)(proto))(it_func))(args); \
| ^~~~
./include/linux/tracepoint.h:210:5: note: in expansion of macro ‘TP_ARGS’
210 | TP_ARGS(data_args), \
| ^~~~~~~
./include/linux/tracepoint.h:244:2: note: in expansion of macro ‘__DECLARE_TRACE_RCU’
244 | __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~~~~~
./include/linux/tracepoint.h:245:37: note: in expansion of macro ‘PARAMS’
245 | PARAMS(cond), PARAMS(data_proto), PARAMS(data_args)) \
| ^~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
378 | PARAMS(__data, args))
| ^~~~~~
drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
98 | DECLARE_TRACE(binder_txn_latency_alloc,
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
100 | TP_ARGS(t, e)
| ^~~~~~~
./include/linux/tracepoint.h:191:6: error: too many arguments to function ‘(void (*)(void *, struct binder_transaction *))it_func’
191 | ((void(*)(proto))(it_func))(args); \
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/tracepoint.h:208:4: note: in expansion of macro ‘__DO_TRACE’
208 | __DO_TRACE(&__tracepoint_##name, \
| ^~~~~~~~~~
./include/linux/tracepoint.h:244:2: note: in expansion of macro ‘__DECLARE_TRACE_RCU’
244 | __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
98 | DECLARE_TRACE(binder_txn_latency_alloc,
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h: At top level:
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:231:34: note: in definition of macro ‘__DECLARE_TRACE’
231 | static inline void trace_##name(proto) \
| ^~~~~
./include/linux/tracepoint.h:375:24: note: in expansion of macro ‘PARAMS’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:205:44: note: in definition of macro ‘__DECLARE_TRACE_RCU’
205 | static inline void trace_##name##_rcuidle(proto) \
| ^~~~~
./include/linux/tracepoint.h:244:28: note: in expansion of macro ‘PARAMS’
244 | __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:375:24: note: in expansion of macro ‘PARAMS’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:247:38: note: in definition of macro ‘__DECLARE_TRACE’
247 | register_trace_##name(void (*probe)(data_proto), void *data) \
| ^~~~~~~~~~
./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
377 | PARAMS(void *__data, proto), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
./include/linux/tracepoint.h:247:51: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
247 | register_trace_##name(void (*probe)(data_proto), void *data) \
| ^~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:253:43: note: in definition of macro ‘__DECLARE_TRACE’
253 | register_trace_prio_##name(void (*probe)(data_proto), void *data,\
| ^~~~~~~~~~
./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
377 | PARAMS(void *__data, proto), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
./include/linux/tracepoint.h:253:56: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
253 | register_trace_prio_##name(void (*probe)(data_proto), void *data,\
| ^~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:260:40: note: in definition of macro ‘__DECLARE_TRACE’
260 | unregister_trace_##name(void (*probe)(data_proto), void *data) \
| ^~~~~~~~~~
./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
377 | PARAMS(void *__data, proto), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
./include/linux/tracepoint.h:260:53: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
260 | unregister_trace_##name(void (*probe)(data_proto), void *data) \
| ^~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:266:46: note: in definition of macro ‘__DECLARE_TRACE’
266 | check_trace_callback_type_##name(void (*cb)(data_proto)) \
| ^~~~~~~~~~
./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
377 | PARAMS(void *__data, proto), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
make[2]: *** [scripts/Makefile.build:283: drivers/android/binderfs.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from drivers/android/binder_latency_tracer.c:8:
drivers/android/binder_internal.h:141:20: error: ‘BINDERFS_MAX_NAME’ undeclared here (not in a function)
141 | char context_name[BINDERFS_MAX_NAME + 1];
| ^~~~~~~~~~~~~~~~~
drivers/android/binder_internal.h:537:17: error: field ‘tv’ has incomplete type
537 | struct timeval tv;
| ^~
In file included from drivers/android/binder_trace.h:12,
from drivers/android/binder_latency_tracer.c:9:
drivers/android/binder_trace.h: In function ‘trace_binder_txn_latency_alloc’:
drivers/android/binder_trace.h:100:13: error: ‘e’ undeclared (first use in this function)
100 | TP_ARGS(t, e)
| ^
./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
191 | ((void(*)(proto))(it_func))(args); \
| ^~~~
./include/linux/tracepoint.h:236:5: note: in expansion of macro ‘TP_ARGS’
236 | TP_ARGS(data_args), \
| ^~~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
378 | PARAMS(__data, args))
| ^~~~~~
drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
98 | DECLARE_TRACE(binder_txn_latency_alloc,
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
100 | TP_ARGS(t, e)
| ^~~~~~~
drivers/android/binder_trace.h:100:13: note: each undeclared identifier is reported only once for each function it appears in
100 | TP_ARGS(t, e)
| ^
./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
191 | ((void(*)(proto))(it_func))(args); \
| ^~~~
./include/linux/tracepoint.h:236:5: note: in expansion of macro ‘TP_ARGS’
236 | TP_ARGS(data_args), \
| ^~~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
378 | PARAMS(__data, args))
| ^~~~~~
drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
98 | DECLARE_TRACE(binder_txn_latency_alloc,
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
100 | TP_ARGS(t, e)
| ^~~~~~~
./include/linux/tracepoint.h:191:6: error: too many arguments to function ‘(void (*)(void *, struct binder_transaction *))it_func’
191 | ((void(*)(proto))(it_func))(args); \
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/tracepoint.h:234:4: note: in expansion of macro ‘__DO_TRACE’
234 | __DO_TRACE(&__tracepoint_##name, \
| ^~~~~~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
98 | DECLARE_TRACE(binder_txn_latency_alloc,
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h: At top level:
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:231:34: note: in definition of macro ‘__DECLARE_TRACE’
231 | static inline void trace_##name(proto) \
| ^~~~~
./include/linux/tracepoint.h:375:24: note: in expansion of macro ‘PARAMS’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:247:38: note: in definition of macro ‘__DECLARE_TRACE’
247 | register_trace_##name(void (*probe)(data_proto), void *data) \
| ^~~~~~~~~~
./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
377 | PARAMS(void *__data, proto), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
./include/linux/tracepoint.h:247:51: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
247 | register_trace_##name(void (*probe)(data_proto), void *data) \
| ^~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:253:43: note: in definition of macro ‘__DECLARE_TRACE’
253 | register_trace_prio_##name(void (*probe)(data_proto), void *data,\
| ^~~~~~~~~~
./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
377 | PARAMS(void *__data, proto), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
./include/linux/tracepoint.h:253:56: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
253 | register_trace_prio_##name(void (*probe)(data_proto), void *data,\
| ^~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:260:40: note: in definition of macro ‘__DECLARE_TRACE’
260 | unregister_trace_##name(void (*probe)(data_proto), void *data) \
| ^~~~~~~~~~
./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
377 | PARAMS(void *__data, proto), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
./include/linux/tracepoint.h:260:53: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
260 | unregister_trace_##name(void (*probe)(data_proto), void *data) \
| ^~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:266:46: note: in definition of macro ‘__DECLARE_TRACE’
266 | check_trace_callback_type_##name(void (*cb)(data_proto)) \
| ^~~~~~~~~~
./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
377 | PARAMS(void *__data, proto), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
In file included from drivers/android/binder.c:75:
drivers/android/binder_internal.h:537:17: error: field ‘tv’ has incomplete type
537 | struct timeval tv;
| ^~
In file included from ./include/trace/syscall.h:5,
from ./include/linux/syscalls.h:84,
from drivers/android/binder.c:66:
drivers/android/binder_trace.h: In function ‘trace_binder_txn_latency_alloc’:
drivers/android/binder_trace.h:100:13: error: ‘e’ undeclared (first use in this function)
100 | TP_ARGS(t, e)
| ^
./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
191 | ((void(*)(proto))(it_func))(args); \
| ^~~~
./include/linux/tracepoint.h:236:5: note: in expansion of macro ‘TP_ARGS’
236 | TP_ARGS(data_args), \
| ^~~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
378 | PARAMS(__data, args))
| ^~~~~~
drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
98 | DECLARE_TRACE(binder_txn_latency_alloc,
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
100 | TP_ARGS(t, e)
| ^~~~~~~
drivers/android/binder_trace.h:100:13: note: each undeclared identifier is reported only once for each function it appears in
100 | TP_ARGS(t, e)
| ^
./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
191 | ((void(*)(proto))(it_func))(args); \
| ^~~~
./include/linux/tracepoint.h:236:5: note: in expansion of macro ‘TP_ARGS’
236 | TP_ARGS(data_args), \
| ^~~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
378 | PARAMS(__data, args))
| ^~~~~~
drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
98 | DECLARE_TRACE(binder_txn_latency_alloc,
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
100 | TP_ARGS(t, e)
| ^~~~~~~
./include/linux/tracepoint.h:191:6: error: too many arguments to function ‘(void (*)(void *, struct binder_transaction *))it_func’
191 | ((void(*)(proto))(it_func))(args); \
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/tracepoint.h:234:4: note: in expansion of macro ‘__DO_TRACE’
234 | __DO_TRACE(&__tracepoint_##name, \
| ^~~~~~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
98 | DECLARE_TRACE(binder_txn_latency_alloc,
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h: In function ‘trace_binder_txn_latency_alloc_rcuidle’:
drivers/android/binder_trace.h:100:13: error: ‘e’ undeclared (first use in this function)
100 | TP_ARGS(t, e)
| ^
./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
191 | ((void(*)(proto))(it_func))(args); \
| ^~~~
./include/linux/tracepoint.h:210:5: note: in expansion of macro ‘TP_ARGS’
210 | TP_ARGS(data_args), \
| ^~~~~~~
./include/linux/tracepoint.h:244:2: note: in expansion of macro ‘__DECLARE_TRACE_RCU’
244 | __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~~~~~
./include/linux/tracepoint.h:245:37: note: in expansion of macro ‘PARAMS’
245 | PARAMS(cond), PARAMS(data_proto), PARAMS(data_args)) \
| ^~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
378 | PARAMS(__data, args))
| ^~~~~~
drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
98 | DECLARE_TRACE(binder_txn_latency_alloc,
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
100 | TP_ARGS(t, e)
| ^~~~~~~
./include/linux/tracepoint.h:191:6: error: too many arguments to function ‘(void (*)(void *, struct binder_transaction *))it_func’
191 | ((void(*)(proto))(it_func))(args); \
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/tracepoint.h:208:4: note: in expansion of macro ‘__DO_TRACE’
208 | __DO_TRACE(&__tracepoint_##name, \
| ^~~~~~~~~~
./include/linux/tracepoint.h:244:2: note: in expansion of macro ‘__DECLARE_TRACE_RCU’
244 | __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
98 | DECLARE_TRACE(binder_txn_latency_alloc,
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h: At top level:
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:231:34: note: in definition of macro ‘__DECLARE_TRACE’
231 | static inline void trace_##name(proto) \
| ^~~~~
./include/linux/tracepoint.h:375:24: note: in expansion of macro ‘PARAMS’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:205:44: note: in definition of macro ‘__DECLARE_TRACE_RCU’
205 | static inline void trace_##name##_rcuidle(proto) \
| ^~~~~
./include/linux/tracepoint.h:244:28: note: in expansion of macro ‘PARAMS’
244 | __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:375:24: note: in expansion of macro ‘PARAMS’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:247:38: note: in definition of macro ‘__DECLARE_TRACE’
247 | register_trace_##name(void (*probe)(data_proto), void *data) \
| ^~~~~~~~~~
./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
377 | PARAMS(void *__data, proto), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
./include/linux/tracepoint.h:247:51: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
247 | register_trace_##name(void (*probe)(data_proto), void *data) \
| ^~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:253:43: note: in definition of macro ‘__DECLARE_TRACE’
253 | register_trace_prio_##name(void (*probe)(data_proto), void *data,\
| ^~~~~~~~~~
./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
377 | PARAMS(void *__data, proto), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
./include/linux/tracepoint.h:253:56: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
253 | register_trace_prio_##name(void (*probe)(data_proto), void *data,\
| ^~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:260:40: note: in definition of macro ‘__DECLARE_TRACE’
260 | unregister_trace_##name(void (*probe)(data_proto), void *data) \
| ^~~~~~~~~~
./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
377 | PARAMS(void *__data, proto), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
./include/linux/tracepoint.h:260:53: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
260 | unregister_trace_##name(void (*probe)(data_proto), void *data) \
| ^~~~
./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/linux/tracepoint.h:266:46: note: in definition of macro ‘__DECLARE_TRACE’
266 | check_trace_callback_type_##name(void (*cb)(data_proto)) \
| ^~~~~~~~~~
./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
377 | PARAMS(void *__data, proto), \
| ^~~~~~
./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~
drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
drivers/android/binder_latency_tracer.c: In function ‘probe_binder_txn_latency_free’:
drivers/android/binder_latency_tracer.c:43:2: error: implicit declaration of function ‘rtc_time_to_tm’; did you mean ‘rtc_ktime_to_tm’? [-Werror=implicit-function-declaration]
43 | rtc_time_to_tm(t->tv.tv_sec, &tm);
| ^~~~~~~~~~~~~~
| rtc_ktime_to_tm
make[2]: *** [scripts/Makefile.build:283: drivers/android/binder_alloc.o] Error 1
drivers/android/binder_latency_tracer.c: In function ‘init_binder_latency_tracer’:
drivers/android/binder_latency_tracer.c:89:2: error: implicit declaration of function ‘register_trace_binder_txn_latency_free’; did you mean ‘register_trace_binder_txn_latency_info’? [-Werror=implicit-function-declaration]
89 | register_trace_binder_txn_latency_free(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| register_trace_binder_txn_latency_info
drivers/android/binder_latency_tracer.c: In function ‘exit_binder_latency_tracer’:
drivers/android/binder_latency_tracer.c:101:2: error: implicit declaration of function ‘unregister_trace_binder_txn_latency_free’; did you mean ‘unregister_trace_binder_txn_latency_info’? [-Werror=implicit-function-declaration]
101 | unregister_trace_binder_txn_latency_free(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| unregister_trace_binder_txn_latency_info
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:283: drivers/android/binder_latency_tracer.o] Error 1
drivers/android/binder.c: In function ‘binder_txn_latency_free’:
drivers/android/binder.c:1522:2: error: implicit declaration of function ‘trace_binder_txn_latency_free’; did you mean ‘trace_binder_txn_latency_info’? [-Werror=implicit-function-declaration]
1522 | trace_binder_txn_latency_free(t, from_proc, from_thread, to_proc, to_thread);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| trace_binder_txn_latency_info
In file included from ./include/trace/define_trace.h:102,
from drivers/android/binder_trace.h:448,
from drivers/android/binder.c:5822:
drivers/android/./binder_trace.h: At top level:
drivers/android/./binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/trace/trace_events.h:510:58: note: in definition of macro ‘DECLARE_EVENT_CLASS’
510 | struct trace_event_data_offsets_##call *__data_offsets, proto) \
| ^~~~~
./include/trace/trace_events.h:76:9: note: in expansion of macro ‘PARAMS’
76 | PARAMS(proto), \
| ^~~~~~
drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/./binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
In file included from ./include/trace/define_trace.h:102,
from drivers/android/binder_trace.h:448,
from drivers/android/binder.c:5822:
drivers/android/./binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/trace/trace_events.h:674:44: note: in definition of macro ‘DECLARE_EVENT_CLASS’
674 | trace_event_raw_event_##call(void *__data, proto) \
| ^~~~~
./include/trace/trace_events.h:76:9: note: in expansion of macro ‘PARAMS’
76 | PARAMS(proto), \
| ^~~~~~
drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/./binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
drivers/android/./binder_trace.h: In function ‘ftrace_test_probe_binder_txn_latency_free’:
./include/trace/trace_events.h:709:2: error: implicit declaration of function ‘check_trace_callback_type_binder_txn_latency_free’; did you mean ‘check_trace_callback_type_binder_txn_latency_info’? [-Werror=implicit-function-declaration]
709 | check_trace_callback_type_##call(trace_event_raw_event_##template); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:81:2: note: in expansion of macro ‘DEFINE_EVENT’
81 | DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args));
| ^~~~~~~~~~~~
drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
./include/trace/trace_events.h:709:35: error: ‘trace_event_raw_event_binder_txn_latency_free’ undeclared (first use in this function); did you mean ‘trace_event_raw_binder_txn_latency_free’?
709 | check_trace_callback_type_##call(trace_event_raw_event_##template); \
| ^~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:81:2: note: in expansion of macro ‘DEFINE_EVENT’
81 | DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args));
| ^~~~~~~~~~~~
drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/./binder_trace.h: At top level:
drivers/android/./binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/trace/trace_events.h:618:34: note: in definition of macro ‘_TRACE_PERF_PROTO’
618 | perf_trace_##call(void *__data, proto);
| ^~~~~
./include/trace/trace_events.h:733:25: note: in expansion of macro ‘PARAMS’
733 | _TRACE_PERF_PROTO(call, PARAMS(proto)); \
| ^~~~~~
./include/trace/trace_events.h:75:2: note: in expansion of macro ‘DECLARE_EVENT_CLASS’
75 | DECLARE_EVENT_CLASS(name, \
| ^~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:76:9: note: in expansion of macro ‘PARAMS’
76 | PARAMS(proto), \
| ^~~~~~
drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/./binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
In file included from ./include/trace/define_trace.h:102,
from drivers/android/binder_trace.h:448,
from drivers/android/binder.c:5822:
./include/trace/trace_events.h:740:13: error: ‘trace_event_raw_event_binder_txn_latency_free’ undeclared here (not in a function); did you mean ‘trace_event_raw_binder_txn_latency_free’?
740 | .probe = trace_event_raw_event_##call, \
| ^~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:75:2: note: in expansion of macro ‘DECLARE_EVENT_CLASS’
75 | DECLARE_EVENT_CLASS(name, \
| ^~~~~~~~~~~~~~~~~~~
drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
In file included from ./include/trace/define_trace.h:102,
from drivers/android/binder_trace.h:448,
from drivers/android/binder.c:5822:
./include/trace/trace_events.h:621:17: error: ‘perf_trace_binder_txn_latency_free’ undeclared here (not in a function); did you mean ‘print_fmt_binder_txn_latency_free’?
621 | .perf_probe = perf_trace_##call,
| ^~~~~~~~~~~
./include/trace/trace_events.h:742:2: note: in expansion of macro ‘_TRACE_PERF_INIT’
742 | _TRACE_PERF_INIT(call) \
| ^~~~~~~~~~~~~~~~
./include/trace/trace_events.h:75:2: note: in expansion of macro ‘DECLARE_EVENT_CLASS’
75 | DECLARE_EVENT_CLASS(name, \
| ^~~~~~~~~~~~~~~~~~~
drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
In file included from ./include/trace/define_trace.h:103,
from drivers/android/binder_trace.h:448,
from drivers/android/binder.c:5822:
drivers/android/./binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
111 | int from_proc, int from_thread
| ^~~
./include/trace/perf.h:33:33: note: in definition of macro ‘DECLARE_EVENT_CLASS’
33 | perf_trace_##call(void *__data, proto) \
| ^~~~~
./include/trace/trace_events.h:76:9: note: in expansion of macro ‘PARAMS’
76 | PARAMS(proto), \
| ^~~~~~
drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
109 | TRACE_EVENT(binder_txn_latency_free,
| ^~~~~~~~~~~
drivers/android/./binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
110 | TP_PROTO(struct binder_transaction *t
| ^~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:283: drivers/android/binder.o] Error 1
make[1]: *** [scripts/Makefile.build:500: drivers/android] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1788: drivers] Error 2

2020-09-07 06:53:10

by Frankie Chang

[permalink] [raw]
Subject: Re: [PATCH v7] binder: transaction latency tracking for user build

On Thu, 2020-09-03 at 18:21 +0200, Greg Kroah-Hartman wrote:
> On Tue, Aug 04, 2020 at 09:59:09PM +0800, Frankie Chang wrote:
> >
> > Frankie.Chang (3):
> > binder: move structs from core file to header file
> > binder: add trace at free transaction.
> > binder: add transaction latency tracer
> >
> > drivers/android/Kconfig | 8 +
> > drivers/android/Makefile | 1 +
> > drivers/android/binder.c | 425 ++-----------------------------
> > drivers/android/binder_internal.h | 417 ++++++++++++++++++++++++++++++
> > drivers/android/binder_latency_tracer.c | 112 ++++++++
> > drivers/android/binder_trace.h | 49 ++++
> > 6 files changed, 607 insertions(+), 405 deletions(-) create mode 100644 drivers/android/binder_latency_tracer.c
>
> This series blows up the build into lots of tiny pieces, how was it
> tested?
>

I am sorry that I had built pass.on the too older kernel, and some of
api had been deprecated.
I have fixed these errors in local, and I add the
EXPORT_TRACEPOINT_SYMBOL for binder_latency_tracer to be ko needed.

Do I need to push a patch V8 or I provide the fixed code here ?

~/mtk_soc_new$ cat b.log | grep binder
CC drivers/android/binderfs.o
CC drivers/android/binder.o
CC [M] drivers/android/binder_latency_tracer.o
LD [M] drivers/android/binder_latency_tracer.ko

~/mtk_soc_new$ tail -n 10 b.log
make[1]: Leaving directory `/proj/mtk16184/mtk_soc_new/kernel/mediatek'
make ARCH=arm64
CROSS_COMPILE=/proj/mtk16184/mtk_soc_new/prebuilt/toolchain/aarch64/usr/bin/aarch64-poky-linux/aarch64-poky-linux- O=/proj/mtk16184/mtk_soc_new/out -C kernel/mediatek dtbs
make[1]: Entering directory `/proj/mtk16184/mtk_soc_new/kernel/mediatek'
make[2]: Entering directory `/proj/mtk16184/mtk_soc_new/out'
arch/arm64/Makefile:26: ld does not support --fix-cortex-a53-843419;
kernel may be susceptible to erratum
arch/arm64/Makefile:34: LSE atomics not supported by binutils
make[2]: Leaving directory `/proj/mtk16184/mtk_soc_new/out'
make[1]: Leaving directory `/proj/mtk16184/mtk_soc_new/kernel/mediatek'
cat /proj/mtk16184/mtk_soc_new/out/arch/arm64/boot/Image.gz /proj/mtk16184/mtk_soc_new/out/arch/arm64/boot/dts/mediatek/mt6779-evb.dtb > /proj/mtk16184/mtk_soc_new/out/arch/arm64/boot/Image.gz-dtb
/proj/mtk16184/mtk_soc_new/prebuilt/bootable/mkbootimg
--kernel /proj/mtk16184/mtk_soc_new/out/arch/arm64/boot/Image.gz-dtb
--ramdisk /proj/mtk16184/mtk_soc_new/prebuilt/bootable/6779_loader/ramdisk.img --base 0x40000000 --ramdisk_offset 0x04000000 --kernel_offset 0x00080000 --cmdline bootopt=64S3,32N2,64N2 --output /proj/mtk16184/mtk_soc_new/prebuilt/bootable/6779_loader/boot.img


> Here's my error logs:
>
> In file included from drivers/android/binderfs.c:37:
> drivers/android/binder_internal.h:537:17: error: field ‘tv’ has incomplete type
> 537 | struct timeval tv;
> | ^~
> In file included from drivers/android/binder_trace.h:12,
> from drivers/android/binder_alloc.c:27:
> drivers/android/binder_trace.h: In function ‘trace_binder_txn_latency_alloc’:
> drivers/android/binder_trace.h:100:13: error: ‘e’ undeclared (first use in this function)
> 100 | TP_ARGS(t, e)
> | ^
> ./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
> 191 | ((void(*)(proto))(it_func))(args); \
> | ^~~~
> ./include/linux/tracepoint.h:236:5: note: in expansion of macro ‘TP_ARGS’
> 236 | TP_ARGS(data_args), \
> | ^~~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
> 378 | PARAMS(__data, args))
> | ^~~~~~
> drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
> 98 | DECLARE_TRACE(binder_txn_latency_alloc,
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
> 100 | TP_ARGS(t, e)
> | ^~~~~~~
> drivers/android/binder_trace.h:100:13: note: each undeclared identifier is reported only once for each function it appears in
> 100 | TP_ARGS(t, e)
> | ^
> ./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
> 191 | ((void(*)(proto))(it_func))(args); \
> | ^~~~
> ./include/linux/tracepoint.h:236:5: note: in expansion of macro ‘TP_ARGS’
> 236 | TP_ARGS(data_args), \
> | ^~~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
> 378 | PARAMS(__data, args))
> | ^~~~~~
> drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
> 98 | DECLARE_TRACE(binder_txn_latency_alloc,
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
> 100 | TP_ARGS(t, e)
> | ^~~~~~~
> ./include/linux/tracepoint.h:191:6: error: too many arguments to function ‘(void (*)(void *, struct binder_transaction *))it_func’
> 191 | ((void(*)(proto))(it_func))(args); \
> | ~^~~~~~~~~~~~~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:234:4: note: in expansion of macro ‘__DO_TRACE’
> 234 | __DO_TRACE(&__tracepoint_##name, \
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
> 98 | DECLARE_TRACE(binder_txn_latency_alloc,
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h: In function ‘trace_binder_txn_latency_alloc_rcuidle’:
> drivers/android/binder_trace.h:100:13: error: ‘e’ undeclared (first use in this function)
> 100 | TP_ARGS(t, e)
> | ^
> ./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
> 191 | ((void(*)(proto))(it_func))(args); \
> | ^~~~
> ./include/linux/tracepoint.h:210:5: note: in expansion of macro ‘TP_ARGS’
> 210 | TP_ARGS(data_args), \
> | ^~~~~~~
> ./include/linux/tracepoint.h:244:2: note: in expansion of macro ‘__DECLARE_TRACE_RCU’
> 244 | __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:245:37: note: in expansion of macro ‘PARAMS’
> 245 | PARAMS(cond), PARAMS(data_proto), PARAMS(data_args)) \
> | ^~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
> 378 | PARAMS(__data, args))
> | ^~~~~~
> drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
> 98 | DECLARE_TRACE(binder_txn_latency_alloc,
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
> 100 | TP_ARGS(t, e)
> | ^~~~~~~
> ./include/linux/tracepoint.h:191:6: error: too many arguments to function ‘(void (*)(void *, struct binder_transaction *))it_func’
> 191 | ((void(*)(proto))(it_func))(args); \
> | ~^~~~~~~~~~~~~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:208:4: note: in expansion of macro ‘__DO_TRACE’
> 208 | __DO_TRACE(&__tracepoint_##name, \
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:244:2: note: in expansion of macro ‘__DECLARE_TRACE_RCU’
> 244 | __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
> 98 | DECLARE_TRACE(binder_txn_latency_alloc,
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h: At top level:
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:231:34: note: in definition of macro ‘__DECLARE_TRACE’
> 231 | static inline void trace_##name(proto) \
> | ^~~~~
> ./include/linux/tracepoint.h:375:24: note: in expansion of macro ‘PARAMS’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:205:44: note: in definition of macro ‘__DECLARE_TRACE_RCU’
> 205 | static inline void trace_##name##_rcuidle(proto) \
> | ^~~~~
> ./include/linux/tracepoint.h:244:28: note: in expansion of macro ‘PARAMS’
> 244 | __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:375:24: note: in expansion of macro ‘PARAMS’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:247:38: note: in definition of macro ‘__DECLARE_TRACE’
> 247 | register_trace_##name(void (*probe)(data_proto), void *data) \
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
> 377 | PARAMS(void *__data, proto), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> ./include/linux/tracepoint.h:247:51: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
> 247 | register_trace_##name(void (*probe)(data_proto), void *data) \
> | ^~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:253:43: note: in definition of macro ‘__DECLARE_TRACE’
> 253 | register_trace_prio_##name(void (*probe)(data_proto), void *data,\
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
> 377 | PARAMS(void *__data, proto), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> ./include/linux/tracepoint.h:253:56: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
> 253 | register_trace_prio_##name(void (*probe)(data_proto), void *data,\
> | ^~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:260:40: note: in definition of macro ‘__DECLARE_TRACE’
> 260 | unregister_trace_##name(void (*probe)(data_proto), void *data) \
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
> 377 | PARAMS(void *__data, proto), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> ./include/linux/tracepoint.h:260:53: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
> 260 | unregister_trace_##name(void (*probe)(data_proto), void *data) \
> | ^~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:266:46: note: in definition of macro ‘__DECLARE_TRACE’
> 266 | check_trace_callback_type_##name(void (*cb)(data_proto)) \
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
> 377 | PARAMS(void *__data, proto), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> make[2]: *** [scripts/Makefile.build:283: drivers/android/binderfs.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> In file included from drivers/android/binder_latency_tracer.c:8:
> drivers/android/binder_internal.h:141:20: error: ‘BINDERFS_MAX_NAME’ undeclared here (not in a function)
> 141 | char context_name[BINDERFS_MAX_NAME + 1];
> | ^~~~~~~~~~~~~~~~~
> drivers/android/binder_internal.h:537:17: error: field ‘tv’ has incomplete type
> 537 | struct timeval tv;
> | ^~
> In file included from drivers/android/binder_trace.h:12,
> from drivers/android/binder_latency_tracer.c:9:
> drivers/android/binder_trace.h: In function ‘trace_binder_txn_latency_alloc’:
> drivers/android/binder_trace.h:100:13: error: ‘e’ undeclared (first use in this function)
> 100 | TP_ARGS(t, e)
> | ^
> ./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
> 191 | ((void(*)(proto))(it_func))(args); \
> | ^~~~
> ./include/linux/tracepoint.h:236:5: note: in expansion of macro ‘TP_ARGS’
> 236 | TP_ARGS(data_args), \
> | ^~~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
> 378 | PARAMS(__data, args))
> | ^~~~~~
> drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
> 98 | DECLARE_TRACE(binder_txn_latency_alloc,
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
> 100 | TP_ARGS(t, e)
> | ^~~~~~~
> drivers/android/binder_trace.h:100:13: note: each undeclared identifier is reported only once for each function it appears in
> 100 | TP_ARGS(t, e)
> | ^
> ./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
> 191 | ((void(*)(proto))(it_func))(args); \
> | ^~~~
> ./include/linux/tracepoint.h:236:5: note: in expansion of macro ‘TP_ARGS’
> 236 | TP_ARGS(data_args), \
> | ^~~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
> 378 | PARAMS(__data, args))
> | ^~~~~~
> drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
> 98 | DECLARE_TRACE(binder_txn_latency_alloc,
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
> 100 | TP_ARGS(t, e)
> | ^~~~~~~
> ./include/linux/tracepoint.h:191:6: error: too many arguments to function ‘(void (*)(void *, struct binder_transaction *))it_func’
> 191 | ((void(*)(proto))(it_func))(args); \
> | ~^~~~~~~~~~~~~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:234:4: note: in expansion of macro ‘__DO_TRACE’
> 234 | __DO_TRACE(&__tracepoint_##name, \
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
> 98 | DECLARE_TRACE(binder_txn_latency_alloc,
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h: At top level:
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:231:34: note: in definition of macro ‘__DECLARE_TRACE’
> 231 | static inline void trace_##name(proto) \
> | ^~~~~
> ./include/linux/tracepoint.h:375:24: note: in expansion of macro ‘PARAMS’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:247:38: note: in definition of macro ‘__DECLARE_TRACE’
> 247 | register_trace_##name(void (*probe)(data_proto), void *data) \
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
> 377 | PARAMS(void *__data, proto), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> ./include/linux/tracepoint.h:247:51: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
> 247 | register_trace_##name(void (*probe)(data_proto), void *data) \
> | ^~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:253:43: note: in definition of macro ‘__DECLARE_TRACE’
> 253 | register_trace_prio_##name(void (*probe)(data_proto), void *data,\
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
> 377 | PARAMS(void *__data, proto), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> ./include/linux/tracepoint.h:253:56: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
> 253 | register_trace_prio_##name(void (*probe)(data_proto), void *data,\
> | ^~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:260:40: note: in definition of macro ‘__DECLARE_TRACE’
> 260 | unregister_trace_##name(void (*probe)(data_proto), void *data) \
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
> 377 | PARAMS(void *__data, proto), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> ./include/linux/tracepoint.h:260:53: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
> 260 | unregister_trace_##name(void (*probe)(data_proto), void *data) \
> | ^~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:266:46: note: in definition of macro ‘__DECLARE_TRACE’
> 266 | check_trace_callback_type_##name(void (*cb)(data_proto)) \
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
> 377 | PARAMS(void *__data, proto), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> In file included from drivers/android/binder.c:75:
> drivers/android/binder_internal.h:537:17: error: field ‘tv’ has incomplete type
> 537 | struct timeval tv;
> | ^~
> In file included from ./include/trace/syscall.h:5,
> from ./include/linux/syscalls.h:84,
> from drivers/android/binder.c:66:
> drivers/android/binder_trace.h: In function ‘trace_binder_txn_latency_alloc’:
> drivers/android/binder_trace.h:100:13: error: ‘e’ undeclared (first use in this function)
> 100 | TP_ARGS(t, e)
> | ^
> ./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
> 191 | ((void(*)(proto))(it_func))(args); \
> | ^~~~
> ./include/linux/tracepoint.h:236:5: note: in expansion of macro ‘TP_ARGS’
> 236 | TP_ARGS(data_args), \
> | ^~~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
> 378 | PARAMS(__data, args))
> | ^~~~~~
> drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
> 98 | DECLARE_TRACE(binder_txn_latency_alloc,
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
> 100 | TP_ARGS(t, e)
> | ^~~~~~~
> drivers/android/binder_trace.h:100:13: note: each undeclared identifier is reported only once for each function it appears in
> 100 | TP_ARGS(t, e)
> | ^
> ./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
> 191 | ((void(*)(proto))(it_func))(args); \
> | ^~~~
> ./include/linux/tracepoint.h:236:5: note: in expansion of macro ‘TP_ARGS’
> 236 | TP_ARGS(data_args), \
> | ^~~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
> 378 | PARAMS(__data, args))
> | ^~~~~~
> drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
> 98 | DECLARE_TRACE(binder_txn_latency_alloc,
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
> 100 | TP_ARGS(t, e)
> | ^~~~~~~
> ./include/linux/tracepoint.h:191:6: error: too many arguments to function ‘(void (*)(void *, struct binder_transaction *))it_func’
> 191 | ((void(*)(proto))(it_func))(args); \
> | ~^~~~~~~~~~~~~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:234:4: note: in expansion of macro ‘__DO_TRACE’
> 234 | __DO_TRACE(&__tracepoint_##name, \
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
> 98 | DECLARE_TRACE(binder_txn_latency_alloc,
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h: In function ‘trace_binder_txn_latency_alloc_rcuidle’:
> drivers/android/binder_trace.h:100:13: error: ‘e’ undeclared (first use in this function)
> 100 | TP_ARGS(t, e)
> | ^
> ./include/linux/tracepoint.h:191:33: note: in definition of macro ‘__DO_TRACE’
> 191 | ((void(*)(proto))(it_func))(args); \
> | ^~~~
> ./include/linux/tracepoint.h:210:5: note: in expansion of macro ‘TP_ARGS’
> 210 | TP_ARGS(data_args), \
> | ^~~~~~~
> ./include/linux/tracepoint.h:244:2: note: in expansion of macro ‘__DECLARE_TRACE_RCU’
> 244 | __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:245:37: note: in expansion of macro ‘PARAMS’
> 245 | PARAMS(cond), PARAMS(data_proto), PARAMS(data_args)) \
> | ^~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:378:4: note: in expansion of macro ‘PARAMS’
> 378 | PARAMS(__data, args))
> | ^~~~~~
> drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
> 98 | DECLARE_TRACE(binder_txn_latency_alloc,
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:100:2: note: in expansion of macro ‘TP_ARGS’
> 100 | TP_ARGS(t, e)
> | ^~~~~~~
> ./include/linux/tracepoint.h:191:6: error: too many arguments to function ‘(void (*)(void *, struct binder_transaction *))it_func’
> 191 | ((void(*)(proto))(it_func))(args); \
> | ~^~~~~~~~~~~~~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:208:4: note: in expansion of macro ‘__DO_TRACE’
> 208 | __DO_TRACE(&__tracepoint_##name, \
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:244:2: note: in expansion of macro ‘__DECLARE_TRACE_RCU’
> 244 | __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> drivers/android/binder_trace.h:98:1: note: in expansion of macro ‘DECLARE_TRACE’
> 98 | DECLARE_TRACE(binder_txn_latency_alloc,
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h: At top level:
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:231:34: note: in definition of macro ‘__DECLARE_TRACE’
> 231 | static inline void trace_##name(proto) \
> | ^~~~~
> ./include/linux/tracepoint.h:375:24: note: in expansion of macro ‘PARAMS’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:205:44: note: in definition of macro ‘__DECLARE_TRACE_RCU’
> 205 | static inline void trace_##name##_rcuidle(proto) \
> | ^~~~~
> ./include/linux/tracepoint.h:244:28: note: in expansion of macro ‘PARAMS’
> 244 | __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:375:24: note: in expansion of macro ‘PARAMS’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:247:38: note: in definition of macro ‘__DECLARE_TRACE’
> 247 | register_trace_##name(void (*probe)(data_proto), void *data) \
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
> 377 | PARAMS(void *__data, proto), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> ./include/linux/tracepoint.h:247:51: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
> 247 | register_trace_##name(void (*probe)(data_proto), void *data) \
> | ^~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:253:43: note: in definition of macro ‘__DECLARE_TRACE’
> 253 | register_trace_prio_##name(void (*probe)(data_proto), void *data,\
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
> 377 | PARAMS(void *__data, proto), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> ./include/linux/tracepoint.h:253:56: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
> 253 | register_trace_prio_##name(void (*probe)(data_proto), void *data,\
> | ^~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:260:40: note: in definition of macro ‘__DECLARE_TRACE’
> 260 | unregister_trace_##name(void (*probe)(data_proto), void *data) \
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
> 377 | PARAMS(void *__data, proto), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> ./include/linux/tracepoint.h:260:53: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
> 260 | unregister_trace_##name(void (*probe)(data_proto), void *data) \
> | ^~~~
> ./include/linux/tracepoint.h:375:2: note: in expansion of macro ‘__DECLARE_TRACE’
> 375 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> | ^~~~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/linux/tracepoint.h:266:46: note: in definition of macro ‘__DECLARE_TRACE’
> 266 | check_trace_callback_type_##name(void (*cb)(data_proto)) \
> | ^~~~~~~~~~
> ./include/linux/tracepoint.h:377:4: note: in expansion of macro ‘PARAMS’
> 377 | PARAMS(void *__data, proto), \
> | ^~~~~~
> ./include/linux/tracepoint.h:511:2: note: in expansion of macro ‘DECLARE_TRACE’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~~~~~~~~
> ./include/linux/tracepoint.h:511:22: note: in expansion of macro ‘PARAMS’
> 511 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> | ^~~~~~
> drivers/android/binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> drivers/android/binder_latency_tracer.c: In function ‘probe_binder_txn_latency_free’:
> drivers/android/binder_latency_tracer.c:43:2: error: implicit declaration of function ‘rtc_time_to_tm’; did you mean ‘rtc_ktime_to_tm’? [-Werror=implicit-function-declaration]
> 43 | rtc_time_to_tm(t->tv.tv_sec, &tm);
> | ^~~~~~~~~~~~~~
> | rtc_ktime_to_tm
> make[2]: *** [scripts/Makefile.build:283: drivers/android/binder_alloc.o] Error 1
> drivers/android/binder_latency_tracer.c: In function ‘init_binder_latency_tracer’:
> drivers/android/binder_latency_tracer.c:89:2: error: implicit declaration of function ‘register_trace_binder_txn_latency_free’; did you mean ‘register_trace_binder_txn_latency_info’? [-Werror=implicit-function-declaration]
> 89 | register_trace_binder_txn_latency_free(
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | register_trace_binder_txn_latency_info
> drivers/android/binder_latency_tracer.c: In function ‘exit_binder_latency_tracer’:
> drivers/android/binder_latency_tracer.c:101:2: error: implicit declaration of function ‘unregister_trace_binder_txn_latency_free’; did you mean ‘unregister_trace_binder_txn_latency_info’? [-Werror=implicit-function-declaration]
> 101 | unregister_trace_binder_txn_latency_free(
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | unregister_trace_binder_txn_latency_info
> cc1: some warnings being treated as errors
> make[2]: *** [scripts/Makefile.build:283: drivers/android/binder_latency_tracer.o] Error 1
> drivers/android/binder.c: In function ‘binder_txn_latency_free’:
> drivers/android/binder.c:1522:2: error: implicit declaration of function ‘trace_binder_txn_latency_free’; did you mean ‘trace_binder_txn_latency_info’? [-Werror=implicit-function-declaration]
> 1522 | trace_binder_txn_latency_free(t, from_proc, from_thread, to_proc, to_thread);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | trace_binder_txn_latency_info
> In file included from ./include/trace/define_trace.h:102,
> from drivers/android/binder_trace.h:448,
> from drivers/android/binder.c:5822:
> drivers/android/./binder_trace.h: At top level:
> drivers/android/./binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/trace/trace_events.h:510:58: note: in definition of macro ‘DECLARE_EVENT_CLASS’
> 510 | struct trace_event_data_offsets_##call *__data_offsets, proto) \
> | ^~~~~
> ./include/trace/trace_events.h:76:9: note: in expansion of macro ‘PARAMS’
> 76 | PARAMS(proto), \
> | ^~~~~~
> drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/./binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> In file included from ./include/trace/define_trace.h:102,
> from drivers/android/binder_trace.h:448,
> from drivers/android/binder.c:5822:
> drivers/android/./binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/trace/trace_events.h:674:44: note: in definition of macro ‘DECLARE_EVENT_CLASS’
> 674 | trace_event_raw_event_##call(void *__data, proto) \
> | ^~~~~
> ./include/trace/trace_events.h:76:9: note: in expansion of macro ‘PARAMS’
> 76 | PARAMS(proto), \
> | ^~~~~~
> drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/./binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> drivers/android/./binder_trace.h: In function ‘ftrace_test_probe_binder_txn_latency_free’:
> ./include/trace/trace_events.h:709:2: error: implicit declaration of function ‘check_trace_callback_type_binder_txn_latency_free’; did you mean ‘check_trace_callback_type_binder_txn_latency_info’? [-Werror=implicit-function-declaration]
> 709 | check_trace_callback_type_##call(trace_event_raw_event_##template); \
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> ./include/trace/trace_events.h:81:2: note: in expansion of macro ‘DEFINE_EVENT’
> 81 | DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args));
> | ^~~~~~~~~~~~
> drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> ./include/trace/trace_events.h:709:35: error: ‘trace_event_raw_event_binder_txn_latency_free’ undeclared (first use in this function); did you mean ‘trace_event_raw_binder_txn_latency_free’?
> 709 | check_trace_callback_type_##call(trace_event_raw_event_##template); \
> | ^~~~~~~~~~~~~~~~~~~~~~
> ./include/trace/trace_events.h:81:2: note: in expansion of macro ‘DEFINE_EVENT’
> 81 | DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args));
> | ^~~~~~~~~~~~
> drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/./binder_trace.h: At top level:
> drivers/android/./binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/trace/trace_events.h:618:34: note: in definition of macro ‘_TRACE_PERF_PROTO’
> 618 | perf_trace_##call(void *__data, proto);
> | ^~~~~
> ./include/trace/trace_events.h:733:25: note: in expansion of macro ‘PARAMS’
> 733 | _TRACE_PERF_PROTO(call, PARAMS(proto)); \
> | ^~~~~~
> ./include/trace/trace_events.h:75:2: note: in expansion of macro ‘DECLARE_EVENT_CLASS’
> 75 | DECLARE_EVENT_CLASS(name, \
> | ^~~~~~~~~~~~~~~~~~~
> ./include/trace/trace_events.h:76:9: note: in expansion of macro ‘PARAMS’
> 76 | PARAMS(proto), \
> | ^~~~~~
> drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/./binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> In file included from ./include/trace/define_trace.h:102,
> from drivers/android/binder_trace.h:448,
> from drivers/android/binder.c:5822:
> ./include/trace/trace_events.h:740:13: error: ‘trace_event_raw_event_binder_txn_latency_free’ undeclared here (not in a function); did you mean ‘trace_event_raw_binder_txn_latency_free’?
> 740 | .probe = trace_event_raw_event_##call, \
> | ^~~~~~~~~~~~~~~~~~~~~~
> ./include/trace/trace_events.h:75:2: note: in expansion of macro ‘DECLARE_EVENT_CLASS’
> 75 | DECLARE_EVENT_CLASS(name, \
> | ^~~~~~~~~~~~~~~~~~~
> drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> In file included from ./include/trace/define_trace.h:102,
> from drivers/android/binder_trace.h:448,
> from drivers/android/binder.c:5822:
> ./include/trace/trace_events.h:621:17: error: ‘perf_trace_binder_txn_latency_free’ undeclared here (not in a function); did you mean ‘print_fmt_binder_txn_latency_free’?
> 621 | .perf_probe = perf_trace_##call,
> | ^~~~~~~~~~~
> ./include/trace/trace_events.h:742:2: note: in expansion of macro ‘_TRACE_PERF_INIT’
> 742 | _TRACE_PERF_INIT(call) \
> | ^~~~~~~~~~~~~~~~
> ./include/trace/trace_events.h:75:2: note: in expansion of macro ‘DECLARE_EVENT_CLASS’
> 75 | DECLARE_EVENT_CLASS(name, \
> | ^~~~~~~~~~~~~~~~~~~
> drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> In file included from ./include/trace/define_trace.h:103,
> from drivers/android/binder_trace.h:448,
> from drivers/android/binder.c:5822:
> drivers/android/./binder_trace.h:111:4: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
> 111 | int from_proc, int from_thread
> | ^~~
> ./include/trace/perf.h:33:33: note: in definition of macro ‘DECLARE_EVENT_CLASS’
> 33 | perf_trace_##call(void *__data, proto) \
> | ^~~~~
> ./include/trace/trace_events.h:76:9: note: in expansion of macro ‘PARAMS’
> 76 | PARAMS(proto), \
> | ^~~~~~
> drivers/android/./binder_trace.h:109:1: note: in expansion of macro ‘TRACE_EVENT’
> 109 | TRACE_EVENT(binder_txn_latency_free,
> | ^~~~~~~~~~~
> drivers/android/./binder_trace.h:110:2: note: in expansion of macro ‘TP_PROTO’
> 110 | TP_PROTO(struct binder_transaction *t
> | ^~~~~~~~
> cc1: some warnings being treated as errors
> make[2]: *** [scripts/Makefile.build:283: drivers/android/binder.o] Error 1
> make[1]: *** [scripts/Makefile.build:500: drivers/android] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make: *** [Makefile:1788: drivers] Error 2
>

2020-09-07 07:02:08

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v7] binder: transaction latency tracking for user build

On Mon, Sep 07, 2020 at 02:49:29PM +0800, Frankie Chang wrote:
> On Thu, 2020-09-03 at 18:21 +0200, Greg Kroah-Hartman wrote:
> > On Tue, Aug 04, 2020 at 09:59:09PM +0800, Frankie Chang wrote:
> > >
> > > Frankie.Chang (3):
> > > binder: move structs from core file to header file
> > > binder: add trace at free transaction.
> > > binder: add transaction latency tracer
> > >
> > > drivers/android/Kconfig | 8 +
> > > drivers/android/Makefile | 1 +
> > > drivers/android/binder.c | 425 ++-----------------------------
> > > drivers/android/binder_internal.h | 417 ++++++++++++++++++++++++++++++
> > > drivers/android/binder_latency_tracer.c | 112 ++++++++
> > > drivers/android/binder_trace.h | 49 ++++
> > > 6 files changed, 607 insertions(+), 405 deletions(-) create mode 100644 drivers/android/binder_latency_tracer.c
> >
> > This series blows up the build into lots of tiny pieces, how was it
> > tested?
> >
>
> I am sorry that I had built pass.on the too older kernel, and some of
> api had been deprecated.
> I have fixed these errors in local, and I add the
> EXPORT_TRACEPOINT_SYMBOL for binder_latency_tracer to be ko needed.
>
> Do I need to push a patch V8 or I provide the fixed code here ?

I need a whole new patch series, I dropped yours when it would not
compile properly.

thanks,

greg k-h

2020-09-07 12:09:58

by Frankie Chang

[permalink] [raw]
Subject: [PATCH v8] binder: transaction latency tracking for user build

Change from v8:
- change rtc_time_to_tm to rtc_time64_to_tm.
- change timeval to __kernel_old_timeval due to
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c766d1472c70d25ad475cf56042af1652e792b23
- export tracepoint symbol for binder_txn_latency_* which binder_transaction_latency_tracer to be ko needed.

Change from v7:
- Use the passed-in values instead of accessing via t->from/to_proc/to_thread
for trace_binder_txn_latency_free, when trace_binder_txn_latency_free_enable() return true.
- make a helper function to do the above.

Change from v6:
- change CONFIG_BINDER_TRANSACTION_LATENCY_TRACKING type from bool to tristate
- add comments to @timestamp and @tv under struct binder_transaction
- make binder_txn_latency threshold configurable
- enhance lock protection

Change from v5:
- change config name to the proper one, CONFIG_BINDER_TRANSACTION_LATENCY_TRACKING.
- change tracepoint name to more descriptive one, trace_binder_txn_latency_(alloc|info|free)
- enhance some lock protection.

Change from v4:
- split up into patch series.

Change from v3:
- use tracepoints for binder_update_info and print_binder_transaction_ext,
instead of custom registration functions.

Change from v2:
- create transaction latency module to monitor slow transaction.

Change from v1:
- first patchset.


Frankie.Chang (3):
binder: move structs from core file to header file
binder: add trace at free transaction.
binder: add transaction latency tracer

drivers/android/Kconfig | 8 +
drivers/android/Makefile | 1 +
drivers/android/binder.c | 430 ++----------------------
drivers/android/binder_internal.h | 418 +++++++++++++++++++++++
drivers/android/binder_latency_tracer.c | 112 ++++++
drivers/android/binder_trace.h | 49 +++
6 files changed, 612 insertions(+), 406 deletions(-)
create mode 100644 drivers/android/binder_latency_tracer.c

2020-09-07 12:38:28

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v8] binder: transaction latency tracking for user build

On Mon, Sep 07, 2020 at 08:00:52PM +0800, Frankie Chang wrote:
> Change from v8:
> - change rtc_time_to_tm to rtc_time64_to_tm.
> - change timeval to __kernel_old_timeval due to
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c766d1472c70d25ad475cf56042af1652e792b23

That feels wrong, why can't you use the "new" structure instead?

thanks,

greg k-h