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: <52A8DE00.6060007@gmail.com>
Date:	Wed, 11 Dec 2013 14:49:52 -0700
From:	David Ahern <dsahern@...il.com>
To:	Andi Kleen <andi@...stfloor.org>
CC:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>, Mike Galbraith <efault@....de>,
	Namhyung Kim <namhyung@...il.com>,
	Paul Mackerras <paulus@...ba.org>,
	Stephane Eranian <eranian@...gle.com>,
	Adrian Hunter <adrian.hunter@...el.com>
Subject: Re: [PATCH v0 13/71] perf tools: Add machine__get_thread_pid()

On 12/11/13, 2:18 PM, Andi Kleen wrote:
> David Ahern <dsahern@...il.com> writes:
>>
>> Are you looking up the current or next task? If the former why not use
>> sample->pid rather than parsing the sched_switch tracepoint?
>
> The itrace stream doesn't have a pid field, and it needs the exact
> time stamp of the switch. There may not actually be any samples
> before decoding.
>
> -Andi
>

What I meant is this:

perf record -e sched:sched_switch -a -- sleep 1 | perf script -f 
comm,tid,pid,event,trace


qemu-system-x86  8688/8692  sched:sched_switch: 
prev_comm=qemu-system-x86 prev_pid=8692 prev_prio=120 prev_state=S ==> 
next_comm=swapper/15 next_pid=0 next_prio=120

8688/8692 are the pid and tid of the running task. If you are monitoring 
sched_switch events and looking at running task -- the one getting 
scheduled out -- you don't need to parse the tracepoint. But, if you 
want to know next task then you do need to parse it. I was wondering 
which task is getting looked up.

David
--
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