Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1737311

Re: [PATCH 4/4] Replace printf with fprintf for all the output functions

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] Replace printf with fprintf for all the output functions
Date 2017-09-22 11:10 +0200
Message-ID <uss8b-4hz-53@gated-at.bofh.it> (permalink)
References <uqXg6-1HP-9@gated-at.bofh.it> <uqXg7-1HP-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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?

thanks,
jirka

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] perf script: Add script per-event-dump support yuzhoujian <ufo19890607@gmail.com> - 2017-09-18 08:00 +0200
  [PATCH 3/4] Add the fp_selection_helper function to set the file pointer for the related functions yuzhoujian <ufo19890607@gmail.com> - 2017-09-18 08:00 +0200
    Re: [PATCH 3/4] Add the fp_selection_helper function to set the file  pointer for the related functions Jiri Olsa <jolsa@redhat.com> - 2017-09-22 11:10 +0200
      Re: [PATCH 3/4] Add the fp_selection_helper function to set the file  pointer for the related functions Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-09-22 16:30 +0200
  [PATCH 1/4] Add a new element for the struct perf_tool, and add the --per-event-dump option for perf script yuzhoujian <ufo19890607@gmail.com> - 2017-09-18 08:00 +0200
    Re: [PATCH 1/4] Add a new element for the struct perf_tool, and add  the --per-event-dump option for perf script Jiri Olsa <jolsa@redhat.com> - 2017-09-22 11:10 +0200
    Re: [PATCH 1/4] Add a new element for the struct perf_tool, and add  the --per-event-dump option for perf script Jiri Olsa <jolsa@redhat.com> - 2017-09-22 11:10 +0200
    Re: [PATCH 1/4] Add a new element for the struct perf_tool, and add  the --per-event-dump option for perf script Jiri Olsa <jolsa@redhat.com> - 2017-09-22 11:10 +0200
  [PATCH 4/4] Replace printf with fprintf for all the output functions yuzhoujian <ufo19890607@gmail.com> - 2017-09-18 08:00 +0200
    Re: [PATCH 4/4] Replace printf with fprintf for all the output  functions Jiri Olsa <jolsa@redhat.com> - 2017-09-22 11:10 +0200
      Re: [PATCH 4/4] Replace printf with fprintf for all the output  functions Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-09-22 16:20 +0200
    Re: [PATCH 4/4] Replace printf with fprintf for all the output  functions Jiri Olsa <jolsa@redhat.com> - 2017-09-22 11:10 +0200
  Re: [PATCH 0/4] perf script: Add script per-event-dump support Jiri Olsa <jolsa@redhat.com> - 2017-09-18 09:30 +0200

csiph-web