From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932607AbcCXHkp (ORCPT ); Thu, 24 Mar 2016 03:40:45 -0400 Received: from terminus.zytor.com ([198.137.202.10]:43166 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751454AbcCXHkb (ORCPT ); Thu, 24 Mar 2016 03:40:31 -0400 Date: Thu, 24 Mar 2016 00:40:12 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: adrian.hunter@intel.com, wangnan0@huawei.com, naveen.n.rao@linux.vnet.ibm.com, jolsa@kernel.org, namhyung@kernel.org, mingo@kernel.org, hemant@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, hpa@zytor.com, ravi.bangoria@linux.vnet.ibm.com, acme@redhat.com, tglx@linutronix.de Reply-To: jolsa@kernel.org, namhyung@kernel.org, mingo@kernel.org, naveen.n.rao@linux.vnet.ibm.com, wangnan0@huawei.com, adrian.hunter@intel.com, tglx@linutronix.de, acme@redhat.com, hpa@zytor.com, ravi.bangoria@linux.vnet.ibm.com, hemant@linux.vnet.ibm.com, linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf thread: Rename perf_event__preprocess_sample_addr to thread__resolve Git-Commit-ID: c2740a87ca989ca42b0c078e021654e247a08311 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: c2740a87ca989ca42b0c078e021654e247a08311 Gitweb: http://git.kernel.org/tip/c2740a87ca989ca42b0c078e021654e247a08311 Author: Arnaldo Carvalho de Melo AuthorDate: Tue, 22 Mar 2016 18:44:46 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 23 Mar 2016 12:03:08 -0300 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 Cc: Hemant Kumar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Ravi Bangoria Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-2b33hs9bp550tezzlhl4kejh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- 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 02a65d1..4bc9207 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 1c9689e..049438d 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 a89c29e..52cf479 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 22921fd..6bb1c92 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);