lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3ebd97c7-2fbc-757d-f733-5edd901ccc60@gmail.com>
Date:   Sat, 16 Sep 2017 09:23:32 -0600
From:   David Ahern <dsahern@...il.com>
To:     yuzhoujian <ufo19890607@...il.com>, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        jolsa@...nel.org, namhyung@...nel.org, yuzhoujian@...ichuxing.com
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] Makes all those related functions receive the FILE
 pointer

On 9/13/17 9:10 AM, yuzhoujian wrote:
> @@ -1621,8 +1634,12 @@ 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);
> +	if (tool->orientation_output == false)
> +		fp = stdout;
> +	else
> +		fp = orientation_file;
> +	fprint_sample_start(sample, thread, evsel, fp);
> +	perf_event__fprintf(event, fp);
>  	ret = 0;
>  out:
>  	thread__put(thread);

The subject of this patch is replacing printf and stdout with fprintf
and a given fp. Please keep it to that one change. Meaning the above
setting of fp something other than stdout should be a separate patch.

And it would be best to have the fp selection in a helper, versus the
same change in so many places.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ