From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751837AbcGMHM3 (ORCPT ); Wed, 13 Jul 2016 03:12:29 -0400 Received: from terminus.zytor.com ([198.137.202.10]:41060 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750901AbcGMHMV (ORCPT ); Wed, 13 Jul 2016 03:12:21 -0400 Date: Wed, 13 Jul 2016 00:12:01 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: wangnan0@huawei.com, acme@redhat.com, mingo@kernel.org, namhyung@kernel.org, linux-kernel@vger.kernel.org, jolsa@kernel.org, tglx@linutronix.de, adrian.hunter@intel.com, dsahern@gmail.com, hpa@zytor.com Reply-To: tglx@linutronix.de, dsahern@gmail.com, adrian.hunter@intel.com, hpa@zytor.com, linux-kernel@vger.kernel.org, jolsa@kernel.org, namhyung@kernel.org, wangnan0@huawei.com, acme@redhat.com, mingo@kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf evsel: Uninline the is_function_event method Git-Commit-ID: 5496bc0c0d255f2a8a3a4c36087eb3b72ff63ea0 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: 5496bc0c0d255f2a8a3a4c36087eb3b72ff63ea0 Gitweb: http://git.kernel.org/tip/5496bc0c0d255f2a8a3a4c36087eb3b72ff63ea0 Author: Arnaldo Carvalho de Melo AuthorDate: Thu, 7 Jul 2016 11:51:47 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 12 Jul 2016 15:19:59 -0300 perf evsel: Uninline the is_function_event method So that we don't have to carry a string.h header in evsel.h Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-2lwpm2aytdvvgo626zuat6et@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/evsel.c | 18 ++++++++++++++++++ tools/perf/util/evsel.h | 18 +----------------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index d8c2298..ba0f59f 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -200,6 +200,24 @@ void perf_evsel__set_sample_id(struct perf_evsel *evsel, evsel->attr.read_format |= PERF_FORMAT_ID; } +/** + * perf_evsel__is_function_event - Return whether given evsel is a function + * trace event + * + * @evsel - evsel selector to be tested + * + * Return %true if event is function trace event + */ +bool perf_evsel__is_function_event(struct perf_evsel *evsel) +{ +#define FUNCTION_EVENT "ftrace:function" + + return evsel->name && + !strncmp(FUNCTION_EVENT, evsel->name, sizeof(FUNCTION_EVENT)); + +#undef FUNCTION_EVENT +} + void perf_evsel__init(struct perf_evsel *evsel, struct perf_event_attr *attr, int idx) { diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index 86fed7a..d73391e 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -355,23 +355,7 @@ static inline bool perf_evsel__is_group_event(struct perf_evsel *evsel) return perf_evsel__is_group_leader(evsel) && evsel->nr_members > 1; } -/** - * perf_evsel__is_function_event - Return whether given evsel is a function - * trace event - * - * @evsel - evsel selector to be tested - * - * Return %true if event is function trace event - */ -static inline bool perf_evsel__is_function_event(struct perf_evsel *evsel) -{ -#define FUNCTION_EVENT "ftrace:function" - - return evsel->name && - !strncmp(FUNCTION_EVENT, evsel->name, sizeof(FUNCTION_EVENT)); - -#undef FUNCTION_EVENT -} +bool perf_evsel__is_function_event(struct perf_evsel *evsel); static inline bool perf_evsel__is_bpf_output(struct perf_evsel *evsel) {