lkml.org 
[lkml]   [2019]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] perf record: Add an option to take an AUX snapshot on exit
Em Tue, Aug 06, 2019 at 05:41:01PM +0300, Alexander Shishkin escreveu:
> It is sometimes useful to generate a snapshot when perf record exits;
> I've been using a wrapper script around the workload that would do a
> killall -USR2 perf when the workload exits.
>
> @@ -654,7 +670,7 @@ int record__auxtrace_mmap_read(struct record *rec __maybe_unused,
> }
>
> static inline
> -void record__read_auxtrace_snapshot(struct record *rec __maybe_unused)
> +void record__read_auxtrace_snapshot(struct record *rec __maybe_unused, bool on_exit)

You forgot to add the __maybe_unused for the on_exit and later for the
'rec' in record__auxtrace_snapshot_exit, which causes the build to fail
when auxtrace isn't being built, I've fixed those.

- Arnaldo

> {
> }
>
> @@ -664,6 +680,12 @@ int auxtrace_record__snapshot_start(struct auxtrace_record *itr __maybe_unused)
> return 0;
> }
>
> +static inline
> +int record__auxtrace_snapshot_exit(struct record *rec)
> +{
> + return 0;
> +}
> +
> static int record__auxtrace_init(struct record *rec __maybe_unused)
> {
> return 0;
> @@ -1536,7 +1558,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)

\
 
 \ /
  Last update: 2019-08-13 17:34    [W:0.058 / U:0.804 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site