Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1363715
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 10/23] perf thread: Rename perf_event__preprocess_sample_addr to thread__resolve |
| Date | 2016-03-23 22:30 +0100 |
| Message-ID | <rfYvM-Xc-23@gated-at.bofh.it> (permalink) |
| References | <rfYm5-S2-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Arnaldo Carvalho de Melo <acme@redhat.com>
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>
---
tools/perf/builtin-script.c | 4 ++--
tools/perf/util/db-export.c | 2 +-
tools/perf/util/event.c | 6 ++----
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,
}
-static void print_sample_addr(union perf_event *event,
+static void print_sample_addr(union perf_event *event __maybe_unused,
struct perf_sample *sample,
struct thread *thread,
struct perf_event_attr *attr)
@@ -549,7 +549,7 @@ static void print_sample_addr(union perf_event *event,
if (!sample_addr_correlates_sym(attr))
return;
- perf_event__preprocess_sample_addr(event, sample, thread, &al);
+ thread__resolve(thread, &al, sample);
if (PRINT_FIELD(SYM)) {
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,
sample_addr_correlates_sym(&evsel->attr)) {
struct addr_location addr_al;
- perf_event__preprocess_sample_addr(event, sample, thread, &addr_al);
+ thread__resolve(thread, &addr_al, sample);
err = db_ids_from_al(dbe, &addr_al, &es.addr_dso_db_id,
&es.addr_sym_db_id, &es.addr_offset);
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)
return false;
}
-void perf_event__preprocess_sample_addr(union perf_event *event __maybe_unused,
- struct perf_sample *sample,
- struct thread *thread,
- struct addr_location *al)
+void thread__resolve(struct thread *thread, struct addr_location *al,
+ struct perf_sample *sample)
{
thread__find_addr_map(thread, sample->cpumode, MAP__FUNCTION, sample->addr, al);
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;
bool is_bts_event(struct perf_event_attr *attr);
bool sample_addr_correlates_sym(struct perf_event_attr *attr);
-void perf_event__preprocess_sample_addr(union perf_event *event,
- struct perf_sample *sample,
- struct thread *thread,
- struct addr_location *al);
+void thread__resolve(struct thread *thread, struct addr_location *al,
+ struct perf_sample *sample);
const char *perf_event__name(unsigned int id);
--
2.5.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/23] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:20 +0100 [PATCH 03/23] perf symbols: Record text offset in dso to calculate objdump address Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:20 +0100 [PATCH 06/23] perf tools: Remove misplaced __maybe_unused Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 17/23] perf tools: Do not include stringify.h from the kernel sources Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 04/23] perf bench numa: Fix assertion for nodes bitfield Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 13/23] perf tools: Simplify die() mechanism Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 10/23] perf thread: Rename perf_event__preprocess_sample_addr to thread__resolve Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 14/23] perf tools: Remove needless 'extern' from function prototypes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 07/23] perf tests: Forward the perf_sample in the dwarf unwind test Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 18/23] perf tools: Remove unused perf_pathdup, xstrdup functions Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 12/23] perf tools: Remove unused DIE_IF macro Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 01/23] perf test: Remove 'core_id' check in topo test Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 11/23] perf script: Remove lots of unused arguments Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 15/23] tools lib traceevent: Remove redundant CPU output Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 02/23] tools: Move utilities.mak from perf to tools/scripts/ Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 09/23] perf machine: Rename perf_event__preprocess_sample to machine__resolve Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 19/23] perf help: Use asprintf instead of adhoc equivalents Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 20/23] perf probe: No need to use formatting strbuf method Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 Re: [GIT PULL 00/23] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2016-03-24 08:40 +0100
csiph-web