Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277299
b: refs/heads/master
c: e7984b7
h: refs/heads/master
i:
  277297: 3ceee75
  277295: adbd618
v: v3
  • Loading branch information
David Ahern authored and Arnaldo Carvalho de Melo committed Nov 28, 2011
1 parent c12acb7 commit dfa4fad
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c8e6672035e84799e6167e933fafedc8e3256973
refs/heads/master: e7984b7bee2fca8f582f5bc2bf1e6c93420a5dd5
5 changes: 5 additions & 0 deletions trunk/tools/perf/Documentation/perf-script.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ OPTIONS
CPUs are specified with -: 0-2. Default is to report samples on all
CPUs.

-c::
--comms=::
Only display events for these comms. CSV that understands
file://filename entries.

-I::
--show-info::
Display extended information about the perf.data file. This adds
Expand Down
12 changes: 12 additions & 0 deletions trunk/tools/perf/builtin-script.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ static int process_sample_event(struct perf_tool *tool __used,
struct perf_evsel *evsel,
struct machine *machine)
{
struct addr_location al;
struct thread *thread = machine__findnew_thread(machine, event->ip.pid);

if (thread == NULL) {
Expand All @@ -460,6 +461,15 @@ static int process_sample_event(struct perf_tool *tool __used,
return 0;
}

if (perf_event__preprocess_sample(event, machine, &al, sample, 0) < 0) {
pr_err("problem processing %d event, skipping it.\n",
event->header.type);
return -1;
}

if (al.filtered)
return 0;

if (cpu_list && !test_bit(sample->cpu, cpu_bitmap))
return 0;

Expand Down Expand Up @@ -1086,6 +1096,8 @@ static const struct option options[] = {
"comma separated output fields prepend with 'type:'. Valid types: hw,sw,trace,raw. Fields: comm,tid,pid,time,cpu,event,trace,ip,sym,dso,addr",
parse_output_fields),
OPT_STRING('C', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
OPT_STRING('c', "comms", &symbol_conf.comm_list_str, "comm[,comm...]",
"only display events for these comms"),
OPT_BOOLEAN('I', "show-info", &show_full_info,
"display extended information from perf.data file"),
OPT_END()
Expand Down

0 comments on commit dfa4fad

Please sign in to comment.