Jiri Olsa
5966094239
perf thread_map: Add thread_map__new_event function
...
Introducing the thread_map__new_event function to create a struct
thread_map object from a thread_map event.
Signed-off-by: Jiri Olsa <[email protected] >
Tested-by: Kan Liang <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-12-17 14:38:16 -03:00
Jiri Olsa
792402fd5c
perf thrad_map: Add comm string into array
...
Adding support to hold comm name together with pids in 'struct
thread_map'. It will be useful for --per-thread option to display task
pid together with task name.
Adding thread_map__read_comms function that reads/set
comm string for the 'struct thread_map'.
Getting the task name from /proc/$pid/comm.
Signed-off-by: Jiri Olsa <[email protected] >
Cc: Adrian Hunter <[email protected] >
Cc: Andi Kleen <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-06-26 11:07:01 -03:00
Jiri Olsa
186fbb7432
perf tools: Add reference counting for thread_map object
...
Adding reference counting for thread_map object, so it could be easily
shared among other objects.
Using thread_map__put instead thread_map__delete and making
thread_map__delete static.
Signed-off-by: Jiri Olsa <[email protected] >
Cc: Adrian Hunter <[email protected] >
Cc: Andi Kleen <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
[ Adjustments to move it ahead of the "comm" patches ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-06-25 15:15:50 -03:00
Jiri Olsa
38e89d2b17
perf thread_map: Change map entries into a struct
...
We need to store command names with the pid. Changing map entries to be
a struct holding pid. Process name is coming in shortly.
Signed-off-by: Jiri Olsa <[email protected] >
Cc: Adrian Hunter <[email protected] >
Cc: Andi Kleen <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
[ Split providing the set/get accessors from transforming the entries structs ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-06-23 18:21:45 -03:00
Jiri Olsa
e13798c77b
perf thread_map: Don't access the array entries directly
...
Instead provide a method to set the array entries, and another to access
the contents.
Signed-off-by: Jiri Olsa <[email protected] >
Cc: Adrian Hunter <[email protected] >
Cc: Andi Kleen <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
[ Split providing the set/get accessors from transforming the entries structs ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-06-23 18:21:44 -03:00
Arnaldo Carvalho de Melo
641556c98c
perf thread_map: Create dummy constructor out of open coded equivalent
...
Create a dummy thread_map, one that has just one entry and it is -1,
meaning 'all threads', as this ends up going down to perf_event_open().
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jean Pihet <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-10-14 17:32:52 -03:00
Namhyung Kim
b3a319d528
perf evlist: Add thread_map__nr() helper
...
Introduce and use the thread_map__nr() function to protect a possible
NULL pointer dereference and cleanup the code a bit.
Signed-off-by: Namhyung Kim <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2013-03-15 13:06:02 -03:00
Robert Richter
61d5bf5b01
perf tools: Fix thread map that is type pid_t
...
Thread map is actually type pid_t and not int.
Signed-off-by: Robert Richter <[email protected] >
Cc: Ingo Molnar <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2012-04-11 17:38:50 -03:00
David Ahern
b52956c961
perf tools: Allow multiple threads or processes in record, stat, top
...
Allow a user to collect events for multiple threads or processes
using a comma separated list.
e.g., collect data on a VM and its vhost thread:
perf top -p 21483,21485
perf stat -p 21483,21485 -ddd
perf record -p 21483,21485
or monitoring vcpu threads
perf top -t 21488,21489
perf stat -t 21488,21489 -ddd
perf record -t 21488,21489
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Thomas Gleixner <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: David Ahern <[email protected] >
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2012-02-13 22:54:11 -02:00
Arnaldo Carvalho de Melo
0d37aa34f8
perf tools: Introduce per user view
...
The new --uid command line option will show only the tasks for a given
user, using the proc interface to figure out the existing tasks.
Kernel work is needed to close races at startup, but this should already
be useful in many use cases.
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2012-01-24 19:47:37 -02:00
Arnaldo Carvalho de Melo
9ae7d3351a
perf tools: Add fprintf methods for thread_map and cpu_map classes
...
For helping with debugging.
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2012-01-24 19:46:48 -02:00
Arnaldo Carvalho de Melo
fd78260b53
perf threads: Move thread_map to separate file
...
To untangle it from struct thread handling, that is tied to symbols, etc.
Right now in the python bindings I'm working on I need just a subset of
the util/ files, untangling it allows me to do that.
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Cc: Tom Zanussi <[email protected] >
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2011-01-24 10:59:00 -02:00