[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171003104319.GA13755@krava>
Date: Tue, 3 Oct 2017 12:43:19 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: yuzhoujian <ufo19890607@...il.com>
Cc: peterz@...radead.org, mingo@...hat.com,
alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
dsahern@...il.com, namhyung@...nel.org, milian.wolff@...b.com,
arnaldo.melo@...il.com, yuzhoujian@...ichuxing.com,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [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
Powered by blists - more mailing lists