[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 27/30] Code tagging based latency tracking
- To: Suren Baghdasaryan <surenb@xxxxxxxxxx>
- From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
- Date: Thu, 1 Sep 2022 09:11:17 +0200
- Cc: akpm@xxxxxxxxxxxxxxxxxxxx, kent.overstreet@xxxxxxxxx, mhocko@xxxxxxxx, vbabka@xxxxxxx, hannes@xxxxxxxxxxx, roman.gushchin@xxxxxxxxx, mgorman@xxxxxxx, dave@xxxxxxxxxxxx, willy@xxxxxxxxxxxxx, liam.howlett@xxxxxxxxxx, void@xxxxxxxxxxxxx, juri.lelli@xxxxxxxxxx, ldufour@xxxxxxxxxxxxx, peterx@xxxxxxxxxx, david@xxxxxxxxxx, axboe@xxxxxxxxx, mcgrof@xxxxxxxxxx, masahiroy@xxxxxxxxxx, nathan@xxxxxxxxxx, changbin.du@xxxxxxxxx, ytcoode@xxxxxxxxx, vincent.guittot@xxxxxxxxxx, dietmar.eggemann@xxxxxxx, rostedt@xxxxxxxxxxx, bsegall@xxxxxxxxxx, bristot@xxxxxxxxxx, vschneid@xxxxxxxxxx, cl@xxxxxxxxx, penberg@xxxxxxxxxx, iamjoonsoo.kim@xxxxxxx, 42.hyeyoo@xxxxxxxxx, glider@xxxxxxxxxx, elver@xxxxxxxxxx, dvyukov@xxxxxxxxxx, shakeelb@xxxxxxxxxx, songmuchun@xxxxxxxxxxxxx, arnd@xxxxxxxx, jbaron@xxxxxxxxxx, rientjes@xxxxxxxxxx, minchan@xxxxxxxxxx, kaleshsingh@xxxxxxxxxx, kernel-team@xxxxxxxxxxx, linux-mm@xxxxxxxxx, iommu@xxxxxxxxxxxxxxx, kasan-dev@xxxxxxxxxxxxxxxx, io-uring@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-bcache@xxxxxxxxxxxxxxx, linux-modules@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
- Delivery-date: Thu, 01 Sep 2022 07:12:07 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Tue, Aug 30, 2022 at 02:49:16PM -0700, Suren Baghdasaryan wrote:
> From: Kent Overstreet <kent.overstreet@xxxxxxxxx>
>
> This adds the ability to easily instrument code for measuring latency.
> To use, add the following to calls to your code, at the start and end of
> the event you wish to measure:
>
> code_tag_time_stats_start(start_time);
> code_tag_time_stats_finish(start_time);
>
> Stastistics will then show up in debugfs under
> /sys/kernel/debug/time_stats, listed by file and line number.
>
> Stastics measured include weighted averages of frequency, duration, max
> duration, as well as quantiles.
>
> This patch also instruments all calls to init_wait and finish_wait,
> which includes all calls to wait_event. Example debugfs output:
How can't you do this with a simple eBPF script on top of
trace_sched_stat_* and friends?
|