From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753964AbcFPIdN (ORCPT ); Thu, 16 Jun 2016 04:33:13 -0400 Received: from terminus.zytor.com ([198.137.202.10]:33084 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751276AbcFPIdK (ORCPT ); Thu, 16 Jun 2016 04:33:10 -0400 Date: Thu, 16 Jun 2016 01:32:39 -0700 From: tip-bot for Masami Hiramatsu Message-ID: Cc: acme@redhat.com, mingo@kernel.org, tglx@linutronix.de, brendan.d.gregg@gmail.com, hemant@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, hpa@zytor.com, peterz@infradead.org, mhiramat@kernel.org, ananth@linux.vnet.ibm.com, namhyung@kernel.org Reply-To: hemant@linux.vnet.ibm.com, brendan.d.gregg@gmail.com, peterz@infradead.org, hpa@zytor.com, linux-kernel@vger.kernel.org, mhiramat@kernel.org, ananth@linux.vnet.ibm.com, namhyung@kernel.org, acme@redhat.com, tglx@linutronix.de, mingo@kernel.org In-Reply-To: <20160608092930.3116.67575.stgit@devbox> References: <20160608092930.3116.67575.stgit@devbox> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf buildid: Rename and export build_id_cache__cachedir() Git-Commit-ID: 4698b8b7572ff74d9d17fdb02d5957b7148c64fe 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: 4698b8b7572ff74d9d17fdb02d5957b7148c64fe Gitweb: http://git.kernel.org/tip/4698b8b7572ff74d9d17fdb02d5957b7148c64fe Author: Masami Hiramatsu AuthorDate: Wed, 8 Jun 2016 18:29:30 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 14 Jun 2016 09:29:54 -0300 perf buildid: Rename and export build_id_cache__cachedir() Rename and export build_id_cache__cachedir() for retrieving use of the path of cache directory for given build_id. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Brendan Gregg Cc: Hemant Kumar Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160608092930.3116.67575.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/build-id.c | 12 +++++------- tools/perf/util/build-id.h | 2 ++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c index 20aef90..62b1473 100644 --- a/tools/perf/util/build-id.c +++ b/tools/perf/util/build-id.c @@ -387,9 +387,8 @@ void disable_buildid_cache(void) no_buildid_cache = true; } -static char *build_id_cache__dirname_from_path(const char *name, - bool is_kallsyms, bool is_vdso, - const char *sbuild_id) +char *build_id_cache__cachedir(const char *sbuild_id, const char *name, + bool is_kallsyms, bool is_vdso) { char *realname = (char *)name, *filename; bool slash = is_kallsyms || is_vdso; @@ -417,8 +416,7 @@ int build_id_cache__list_build_ids(const char *pathname, char *dir_name; int ret = 0; - dir_name = build_id_cache__dirname_from_path(pathname, false, false, - NULL); + dir_name = build_id_cache__cachedir(NULL, pathname, false, false); if (!dir_name) return -ENOMEM; @@ -444,8 +442,8 @@ int build_id_cache__add_s(const char *sbuild_id, const char *name, goto out_free; } - dir_name = build_id_cache__dirname_from_path(name, is_kallsyms, - is_vdso, sbuild_id); + dir_name = build_id_cache__cachedir(sbuild_id, name, + is_kallsyms, is_vdso); if (!dir_name) goto out_free; diff --git a/tools/perf/util/build-id.h b/tools/perf/util/build-id.h index e5435f4..d8c7f2f 100644 --- a/tools/perf/util/build-id.h +++ b/tools/perf/util/build-id.h @@ -30,6 +30,8 @@ bool perf_session__read_build_ids(struct perf_session *session, bool with_hits); int perf_session__write_buildid_table(struct perf_session *session, int fd); int perf_session__cache_build_ids(struct perf_session *session); +char *build_id_cache__cachedir(const char *sbuild_id, const char *name, + bool is_kallsyms, bool is_vdso); int build_id_cache__list_build_ids(const char *pathname, struct strlist **result); bool build_id_cache__cached(const char *sbuild_id);