lkml.org 
[lkml]   [2017]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/4] Make all print functions receive the fp argument, and opens a dump file in process_event.
On Tue, Sep 26, 2017 at 02:53:17PM +0800, yuzhoujian wrote:

SNIP

> - perf_event__fprintf(event, stdout);
> + fp = tool->per_event_dump ? per_event_dump_file : stdout;
> + fprint_sample_start(sample, thread, evsel, fp);
> + perf_event__fprintf(event, fp);
> thread__put(thread);
> return 0;
> }
> @@ -2852,6 +2883,8 @@ int cmd_script(int argc, const char **argv)
> file.path = input_name;
> file.force = symbol_conf.force;
>
> + file_name = file.path ? file.path : "perf.data";

you don't need file_name variable, the data file name is
reachable from struct perf_script:

perf_script::session::file

jirka

\
 
 \ /
  Last update: 2017-10-03 12:44    [W:0.035 / U:4.020 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site