diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-03-22 17:44:46 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-03-23 11:03:08 -0400 |
commit | c2740a87ca989ca42b0c078e021654e247a08311 (patch) | |
tree | c10d8068a3e77e974b0e30e162ebd07015f7131a /tools | |
parent | bb3eb56622d1b5932a7708d0af5f3b00f12817b6 (diff) |
perf thread: Rename perf_event__preprocess_sample_addr to thread__resolve
Since none of the perf_event fields are used anymore, just the
perf_sample ones, and since this resolves to (map, symbol) from data
structures within struct thread, rename it to thread__resolve and make
the argument ordering similar to the one in machine__resolve().
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-2b33hs9bp550tezzlhl4kejh@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-script.c | 4 | ||||
-rw-r--r-- | tools/perf/util/db-export.c | 2 | ||||
-rw-r--r-- | tools/perf/util/event.c | 6 | ||||
-rw-r--r-- | tools/perf/util/event.h | 6 |
4 files changed, 7 insertions, 11 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 02a65d15c594..4bc92070363b 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
@@ -537,7 +537,7 @@ static void print_sample_brstacksym(union perf_event *event __maybe_unused, | |||
537 | } | 537 | } |
538 | 538 | ||
539 | 539 | ||
540 | static void print_sample_addr(union perf_event *event, | 540 | static void print_sample_addr(union perf_event *event __maybe_unused, |
541 | struct perf_sample *sample, | 541 | struct perf_sample *sample, |
542 | struct thread *thread, | 542 | struct thread *thread, |
543 | struct perf_event_attr *attr) | 543 | struct perf_event_attr *attr) |
@@ -549,7 +549,7 @@ static void print_sample_addr(union perf_event *event, | |||
549 | if (!sample_addr_correlates_sym(attr)) | 549 | if (!sample_addr_correlates_sym(attr)) |
550 | return; | 550 | return; |
551 | 551 | ||
552 | perf_event__preprocess_sample_addr(event, sample, thread, &al); | 552 | thread__resolve(thread, &al, sample); |
553 | 553 | ||
554 | if (PRINT_FIELD(SYM)) { | 554 | if (PRINT_FIELD(SYM)) { |
555 | printf(" "); | 555 | printf(" "); |
diff --git a/tools/perf/util/db-export.c b/tools/perf/util/db-export.c index 1c9689e4cc17..049438d51b9a 100644 --- a/tools/perf/util/db-export.c +++ b/tools/perf/util/db-export.c | |||
@@ -333,7 +333,7 @@ int db_export__sample(struct db_export *dbe, union perf_event *event, | |||
333 | sample_addr_correlates_sym(&evsel->attr)) { | 333 | sample_addr_correlates_sym(&evsel->attr)) { |
334 | struct addr_location addr_al; | 334 | struct addr_location addr_al; |
335 | 335 | ||
336 | perf_event__preprocess_sample_addr(event, sample, thread, &addr_al); | 336 | thread__resolve(thread, &addr_al, sample); |
337 | err = db_ids_from_al(dbe, &addr_al, &es.addr_dso_db_id, | 337 | err = db_ids_from_al(dbe, &addr_al, &es.addr_dso_db_id, |
338 | &es.addr_sym_db_id, &es.addr_offset); | 338 | &es.addr_sym_db_id, &es.addr_offset); |
339 | if (err) | 339 | if (err) |
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index a89c29e2e0a9..52cf479bc593 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -1392,10 +1392,8 @@ bool sample_addr_correlates_sym(struct perf_event_attr *attr) | |||
1392 | return false; | 1392 | return false; |
1393 | } | 1393 | } |
1394 | 1394 | ||
1395 | void perf_event__preprocess_sample_addr(union perf_event *event __maybe_unused, | 1395 | void thread__resolve(struct thread *thread, struct addr_location *al, |
1396 | struct perf_sample *sample, | 1396 | struct perf_sample *sample) |
1397 | struct thread *thread, | ||
1398 | struct addr_location *al) | ||
1399 | { | 1397 | { |
1400 | thread__find_addr_map(thread, sample->cpumode, MAP__FUNCTION, sample->addr, al); | 1398 | thread__find_addr_map(thread, sample->cpumode, MAP__FUNCTION, sample->addr, al); |
1401 | if (!al->map) | 1399 | if (!al->map) |
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 22921fd0f5b8..6bb1c928350d 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h | |||
@@ -607,10 +607,8 @@ struct thread; | |||
607 | 607 | ||
608 | bool is_bts_event(struct perf_event_attr *attr); | 608 | bool is_bts_event(struct perf_event_attr *attr); |
609 | bool sample_addr_correlates_sym(struct perf_event_attr *attr); | 609 | bool sample_addr_correlates_sym(struct perf_event_attr *attr); |
610 | void perf_event__preprocess_sample_addr(union perf_event *event, | 610 | void thread__resolve(struct thread *thread, struct addr_location *al, |
611 | struct perf_sample *sample, | 611 | struct perf_sample *sample); |
612 | struct thread *thread, | ||
613 | struct addr_location *al); | ||
614 | 612 | ||
615 | const char *perf_event__name(unsigned int id); | 613 | const char *perf_event__name(unsigned int id); |
616 | 614 | ||