diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2015-03-24 09:57:52 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-03-24 12:19:06 -0300 |
commit | 2771984c7f5e6cab812e86ec152da4fb5f6df908 (patch) | |
tree | d64fc4817823894a6a069707812f16bd197c72fa /tools/lib/traceevent/kbuffer-parse.c | |
parent | 55426296963c678650e26fc5e61ea75a5598ef5a (diff) | |
download | linux-2771984c7f5e6cab812e86ec152da4fb5f6df908.tar.gz linux-2771984c7f5e6cab812e86ec152da4fb5f6df908.tar.bz2 linux-2771984c7f5e6cab812e86ec152da4fb5f6df908.zip |
tools lib traceevent: Add pevent_data_pid_from_comm()
There is a pevent_data_comm_from_pid() that returns the cmdline stored for
a given pid in order for users to map pids to comms, but there's no method
to convert a comm back to a pid. This is useful for filters that specify
a comm instead of a PID (it's faster than searching each individual event).
Add a way to retrieve a comm from a pid. Since there can be more than one
pid associated to a comm, it returns a data structure that lets the user
iterate over all the saved comms for a given pid.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20150324135923.001103479@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent/kbuffer-parse.c')
0 files changed, 0 insertions, 0 deletions