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] [thread-next>] [day] [month] [year] [list]
Message-ID: <54B39438.8010701@intel.com>
Date:	Mon, 12 Jan 2015 11:30:32 +0200
From:	Adrian Hunter <adrian.hunter@...el.com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	Robert Richter <rric@...nel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Mike Galbraith <efault@....de>,
	Paul Mackerras <paulus@...ba.org>,
	Stephane Eranian <eranian@...gle.com>,
	Andi Kleen <ak@...ux.intel.com>, kan.liang@...el.com,
	markus.t.metzger@...el.com, mathieu.poirier@...aro.org,
	acme@...radead.org
Subject: Re: [PATCH v8 14/14] perf: add ITRACE_START record to indicate that
 tracing has started

On 09/01/15 16:13, Peter Zijlstra wrote:
> On Fri, Jan 09, 2015 at 03:12:48PM +0100, Peter Zijlstra wrote:
>> On Fri, Nov 14, 2014 at 03:43:47PM +0200, Alexander Shishkin wrote:
>>> +++ b/include/uapi/linux/perf_event.h
>>> @@ -750,6 +750,17 @@ enum perf_event_type {
>>>  	 */
>>>  	PERF_RECORD_AUX				= 11,
>>>  
>>> +	/*
>>> +	 * Indicates that instruction trace has started
>>> +	 *
>>> +	 * struct {
>>> +	 *	struct perf_event_header	header;
>>> +	 *	u32				pid;
>>> +	 *	u32				tid;
>>
>> The below function suggests we should have:
>>
>> 		struct sample_id		sample_id;
>>
>>> +	 * };
>>> +	 */
>>> +	PERF_RECORD_ITRACE_START		= 12,
> 
> This also raises the question; why not use PERF_RECORD_COMM?

They mean slightly different things.

PERF_RECORD_COMM means the comm string has been set. We could infer that tid
was the currently running task but we don't at the moment, and it would be a
constraint that should be documented if we are going to rely on it.
Also it might mess up perf tools a little which calls the idle thread
"swapper" but the kernel calls it "swapper/n" on SMP where n is the cpu number.

PERF_RECORD_ITRACE_START just means that pid/tid was the currently running task.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ