[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170922141418.GG29668@kernel.org>
Date: Fri, 22 Sep 2017 11:14:18 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Jiri Olsa <jolsa@...hat.com>
Cc: yuzhoujian <ufo19890607@...il.com>, 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 4/4] Replace printf with fprintf for all the output
functions
Em Fri, Sep 22, 2017 at 11:03:04AM +0200, Jiri Olsa escreveu:
> On Mon, Sep 18, 2017 at 01:55:22PM +0800, yuzhoujian wrote:
>
> SNIP
>
> > static void process_event(struct perf_script *script,
> > @@ -1389,21 +1389,30 @@ static void process_event(struct perf_script *script,
> > struct perf_event_attr *attr = &evsel->attr;
> > unsigned int type = output_type(attr->type);
> >
> > + const char *evname;
> > + char *file_name;
> > if (output[type].fields == 0)
> > return;
> >
> > + evname = perf_evsel__name(evsel);
> > + if (script->tool.per_event_dump == true) {
> > + if (asprintf(&file_name, "%s%s", evname, ".stack") < 0)
>
> what's the 'stack' suffix for? It's text dump, should we use .txt?
> Also I think it should be more than 'cycles.stack', more like:
>
> <ORIGINAL PERF DATA FILE NAME>-script-dump-cycles.txt
>
> or something like this
>
> Arnaldo, thoughts?
Looks better, yes, I also was puzzled with that ".stack" suffix. And
your comment about using as a prefix the perf.data file being processed
also looks really needed.
- Arnaldo
Powered by blists - more mailing lists