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


Groups > linux.kernel > #1737300

Re: [PATCH 2/4] Makes all those related functions receive the FILE pointer

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/4] Makes all those related functions receive the FILE pointer
Date 2017-09-22 11:10 +0200
Message-ID <uss8a-4hz-13@gated-at.bofh.it> (permalink)
References <uqXg6-1HP-9@gated-at.bofh.it> <uqXg6-1HP-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Sep 18, 2017 at 01:55:20PM +0800, yuzhoujian wrote:

SNIP

>  out_put:
>  	addr_location__put(&al);
> @@ -1605,6 +1617,7 @@ static int process_comm_event(struct perf_tool *tool,
>  	struct perf_session *session = script->session;
>  	struct perf_evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id);
>  	int ret = -1;
> +	FILE *fp;
>  
>  	thread = machine__findnew_thread(machine, event->comm.pid, event->comm.tid);
>  	if (thread == NULL) {
> @@ -1621,8 +1634,9 @@ static int process_comm_event(struct perf_tool *tool,
>  		sample->tid = event->comm.tid;
>  		sample->pid = event->comm.pid;
>  	}
> -	print_sample_start(sample, thread, evsel);
> -	perf_event__fprintf(event, stdout);
> +	fp = stdout;
> +	fprint_sample_start(sample, thread, evsel, fp);
> +	perf_event__fprintf(event, fp);

please make this simple 'adding fp argument to print functions'
change and just pass stdout in here ... and do the rest of changes
later on

thanks,
jirka

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


Thread

[PATCH 2/4] Makes all those related functions receive the FILE pointer yuzhoujian <ufo19890607@gmail.com> - 2017-09-18 08:00 +0200
  Re: [PATCH 2/4] Makes all those related functions receive the FILE  pointer Jiri Olsa <jolsa@redhat.com> - 2017-09-22 11:10 +0200
    Re: [PATCH 2/4] Makes all those related functions receive the FILE  pointer Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-09-22 16:20 +0200
  Re: [PATCH 2/4] Makes all those related functions receive the FILE  pointer Jiri Olsa <jolsa@redhat.com> - 2017-09-22 11:10 +0200
    Re: [PATCH 2/4] Makes all those related functions receive the FILE  pointer Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-09-22 16:20 +0200

csiph-web