Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+7 -11
+2 -2
tools/perf/builtin-script.c
··· 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 541 struct perf_sample *sample, 542 542 struct thread *thread, 543 543 struct perf_event_attr *attr) ··· 549 549 if (!sample_addr_correlates_sym(attr)) 550 550 return; 551 551 552 - perf_event__preprocess_sample_addr(event, sample, thread, &al); 552 + thread__resolve(thread, &al, sample); 553 553 554 554 if (PRINT_FIELD(SYM)) { 555 555 printf(" ");
+1 -1
tools/perf/util/db-export.c
··· 333 333 sample_addr_correlates_sym(&evsel->attr)) { 334 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 337 err = db_ids_from_al(dbe, &addr_al, &es.addr_dso_db_id, 338 338 &es.addr_sym_db_id, &es.addr_offset); 339 339 if (err)
+2 -4
tools/perf/util/event.c
··· 1392 1392 return false; 1393 1393 } 1394 1394 1395 - void perf_event__preprocess_sample_addr(union perf_event *event __maybe_unused, 1396 - struct perf_sample *sample, 1397 - struct thread *thread, 1398 - struct addr_location *al) 1395 + void thread__resolve(struct thread *thread, struct addr_location *al, 1396 + struct perf_sample *sample) 1399 1397 { 1400 1398 thread__find_addr_map(thread, sample->cpumode, MAP__FUNCTION, sample->addr, al); 1401 1399 if (!al->map)
+2 -4
tools/perf/util/event.h
··· 607 607 608 608 bool is_bts_event(struct perf_event_attr *attr); 609 609 bool sample_addr_correlates_sym(struct perf_event_attr *attr); 610 - void perf_event__preprocess_sample_addr(union perf_event *event, 611 - struct perf_sample *sample, 612 - struct thread *thread, 613 - struct addr_location *al); 610 + void thread__resolve(struct thread *thread, struct addr_location *al, 611 + struct perf_sample *sample); 614 612 615 613 const char *perf_event__name(unsigned int id); 616 614