[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f8ff8cb2-913d-c009-53a4-2918ce923a89@sony.com>
Date: Mon, 7 Sep 2020 16:41:56 +0200
From: peter enderborg <peter.enderborg@...y.com>
To: Frankie Chang <Frankie.Chang@...iatek.com>,
Todd Kjos <tkjos@...gle.com>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Joel Fernandes <joel@...lfernandes.org>,
Martijn Coenen <maco@...roid.com>,
Arve Hjønnevåg <arve@...roid.com>,
Christian Brauner <christian@...uner.io>,
<linux-kernel@...r.kernel.org>,
<linux-mediatek@...ts.infradead.org>, <wsd_upstream@...iatek.com>,
Jian-Min Liu <Jian-Min.Liu@...iatek.com>
Subject: Re: [PATCH v7 3/3] binder: add transaction latency tracer
On 8/4/20 3:59 PM, Frankie Chang wrote:
> +void probe_binder_txn_latency_free(void *ignore, struct binder_transaction *t,
> + int from_proc, int from_thread,
> + int to_proc, int to_thread)
> +{
> + struct rtc_time tm;
> + struct timespec64 *startime;
> + struct timespec64 cur, sub_t;
> +
> + ktime_get_ts64(&cur);
I think sched_clock is what you want.
> + startime = &t->timestamp;
> + sub_t = timespec64_sub(cur, *startime);
> +
> + /* if transaction time is over than binder_txn_latency_threshold (sec),
> + * show timeout warning log.
> + */
> + if (sub_t.tv_sec < binder_txn_latency_threshold)
> + return;
> +
> + rtc_time_to_tm(t->tv.tv_sec, &tm);
Powered by blists - more mailing lists