Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp907521imm; Wed, 15 Aug 2018 08:08:44 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxSKUFItLucTXyzhoEn+fbbfxYGS5mCDCzQYReWyC34A0LPotS31BV7bEUUGS1HR0Lv56Ke X-Received: by 2002:a62:b20c:: with SMTP id x12-v6mr28603067pfe.64.1534345724578; Wed, 15 Aug 2018 08:08:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534345724; cv=none; d=google.com; s=arc-20160816; b=YBhazFroZgZQlWlCI9W12VACtD+QQNqx2R/fBFIFtSkbhTpwu9q9OJNt0ZHBjIMW7v 30TcMms8bHz/oZCA4x6s8fJ4XiGly/hARl7g1709HgIqby3oSHv6bWoXwLg/xy+yPS1e 5REiWST1lV1G60bCS3ibTHhv6cd5vjT7qo8mxAAfYWWu/IKqZ2ksJ159bCwNjP7cWiqP smvUiIyYqV/HIYtF3uM0XWc0qFG4lki/StP1ADInzLXBDXJ3A85TtWGjNWagg03JhcfB FoZyxmgA8bSefhxz2K9fjYy4k1X12r79a5+Udp3GIeS2/9juj9zsSIWZbMhpJcnsSNwc ueWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=HY7nsvFA8Wjdcm8U/gIgJlv7+q5d9Rnivdk2cEfHv8Q=; b=uonAYpYi6jT8qbm1EingOcTjCKzMCChYWbn4KYFJfhoUlZ9PKoO3x8K8FMC3U6cc8g 0xlQezG8LRxXgxFhK+ahyOi2+n/6+HFYeptIPP6tPOQ8EBCuP5WyQ3O7xRLZzUH+P56/ RlULiv15FINnb/9kn2EVN3FUrufH3uHvq8Czkui9rcRHR/oCHExbMuEbiJRI24zHcB/H KZu8x7AUFGItbDqR6W6i74cVn0ncoQRQhbTWDnVZOGr3XtLXyrB9wuirgmcoWJ1MGzj5 qSaCIFSEKS26YctGUIryxFSd+NeCeSnzDZz10Jf2umQehJZYumYGtoFQILh3UXJ+wZDo iUqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oDNLshG0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2-v6si23984131pfb.365.2018.08.15.08.08.29; Wed, 15 Aug 2018 08:08:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oDNLshG0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729961AbeHOR74 (ORCPT + 99 others); Wed, 15 Aug 2018 13:59:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:49860 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729386AbeHOR7z (ORCPT ); Wed, 15 Aug 2018 13:59:55 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E1CFF214F0; Wed, 15 Aug 2018 15:07:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1534345642; bh=5gIBpkZcmum3TIdzKOk2+cDtlTnOWpBiohBfDe2Ip38=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oDNLshG0+Gdw5PikGR3ONmdGlD2frlvTURxVgyN5pEU4BnMAf533hfjMCNIje7k4L l7zoU+k/248M0n4mUmHcL6W9EP4RwnXsK7yym+VaWKFsgJgN/BA534bn4Oud3hjrkc KOV7k9oT3dkM+QRACEhnrtbaJ4O2GbgDJqcCdlqE= From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, "Tzvetomir Stoyanov (VMware)" , Andrew Morton , Peter Zijlstra , Yordan Karadzhov , linux-trace-devel@vger.kernel.org, Steven Rostedt , Arnaldo Carvalho de Melo Subject: [PATCH 07/35] tools lib traceevent, perf tools: Rename pevent parse APIs Date: Wed, 15 Aug 2018 12:05:43 -0300 Message-Id: <20180815150611.32080-8-acme@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180815150611.32080-1-acme@kernel.org> References: <20180815150611.32080-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Tzvetomir Stoyanov (VMware)" In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_" and not "pevent_". This changes APIs: pevent_parse_event, pevent_parse_format, pevent_parse_header_page Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Peter Zijlstra Cc: Yordan Karadzhov (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180808180700.469749700@goodmis.org Signed-off-by: Steven Rostedt Signed-off-by: Arnaldo Carvalho de Melo --- tools/lib/traceevent/event-parse.c | 22 +++++++++++----------- tools/lib/traceevent/event-parse.h | 18 +++++++++--------- tools/perf/util/trace-event-parse.c | 4 ++-- tools/perf/util/trace-event-read.c | 4 ++-- tools/perf/util/trace-event.c | 2 +- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 29f22e432084..419e57f5bbf3 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c @@ -5930,7 +5930,7 @@ static void parse_header_field(const char *field, } /** - * pevent_parse_header_page - parse the data stored in the header page + * tep_parse_header_page - parse the data stored in the header page * @pevent: the handle to the pevent * @buf: the buffer storing the header page format string * @size: the size of @buf @@ -5941,8 +5941,8 @@ static void parse_header_field(const char *field, * * /sys/kernel/debug/tracing/events/header_page */ -int pevent_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long size, - int long_size) +int tep_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long size, + int long_size) { int ignore; @@ -6171,7 +6171,7 @@ __pevent_parse_event(struct tep_handle *pevent, } /** - * pevent_parse_format - parse the event format + * tep_parse_format - parse the event format * @pevent: the handle to the pevent * @eventp: returned format * @buf: the buffer storing the event format string @@ -6185,16 +6185,16 @@ __pevent_parse_event(struct tep_handle *pevent, * * /sys/kernel/debug/tracing/events/.../.../format */ -enum pevent_errno pevent_parse_format(struct tep_handle *pevent, - struct event_format **eventp, - const char *buf, - unsigned long size, const char *sys) +enum pevent_errno tep_parse_format(struct tep_handle *pevent, + struct event_format **eventp, + const char *buf, + unsigned long size, const char *sys) { return __pevent_parse_event(pevent, eventp, buf, size, sys); } /** - * pevent_parse_event - parse the event format + * tep_parse_event - parse the event format * @pevent: the handle to the pevent * @buf: the buffer storing the event format string * @size: the size of @buf @@ -6207,8 +6207,8 @@ enum pevent_errno pevent_parse_format(struct tep_handle *pevent, * * /sys/kernel/debug/tracing/events/.../.../format */ -enum pevent_errno pevent_parse_event(struct tep_handle *pevent, const char *buf, - unsigned long size, const char *sys) +enum pevent_errno tep_parse_event(struct tep_handle *pevent, const char *buf, + unsigned long size, const char *sys) { struct event_format *event = NULL; return __pevent_parse_event(pevent, &event, buf, size, sys); diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h index 83c78290061e..eae429a98f7a 100644 --- a/tools/lib/traceevent/event-parse.h +++ b/tools/lib/traceevent/event-parse.h @@ -639,15 +639,15 @@ void pevent_print_event_data(struct tep_handle *pevent, struct trace_seq *s, void pevent_print_event(struct tep_handle *pevent, struct trace_seq *s, struct tep_record *record, bool use_trace_clock); -int pevent_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long size, - int long_size); - -enum pevent_errno pevent_parse_event(struct tep_handle *pevent, const char *buf, - unsigned long size, const char *sys); -enum pevent_errno pevent_parse_format(struct tep_handle *pevent, - struct event_format **eventp, - const char *buf, - unsigned long size, const char *sys); +int tep_parse_header_page(struct tep_handle *pevent, char *buf, unsigned long size, + int long_size); + +enum pevent_errno tep_parse_event(struct tep_handle *pevent, const char *buf, + unsigned long size, const char *sys); +enum pevent_errno tep_parse_format(struct tep_handle *pevent, + struct event_format **eventp, + const char *buf, + unsigned long size, const char *sys); void pevent_free_format(struct event_format *event); void pevent_free_format_field(struct format_field *field); diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c index 0a769a340fc9..f8b91f3813ca 100644 --- a/tools/perf/util/trace-event-parse.c +++ b/tools/perf/util/trace-event-parse.c @@ -180,13 +180,13 @@ void parse_saved_cmdline(struct tep_handle *pevent, int parse_ftrace_file(struct tep_handle *pevent, char *buf, unsigned long size) { - return pevent_parse_event(pevent, buf, size, "ftrace"); + return tep_parse_event(pevent, buf, size, "ftrace"); } int parse_event_file(struct tep_handle *pevent, char *buf, unsigned long size, char *sys) { - return pevent_parse_event(pevent, buf, size, sys); + return tep_parse_event(pevent, buf, size, sys); } struct event_format *trace_find_next_event(struct tep_handle *pevent, diff --git a/tools/perf/util/trace-event-read.c b/tools/perf/util/trace-event-read.c index cbd4970415ef..a89a50dee8e7 100644 --- a/tools/perf/util/trace-event-read.c +++ b/tools/perf/util/trace-event-read.c @@ -235,8 +235,8 @@ static int read_header_files(struct tep_handle *pevent) return -1; } - if (!pevent_parse_header_page(pevent, header_page, size, - pevent_get_long_size(pevent))) { + if (!tep_parse_header_page(pevent, header_page, size, + pevent_get_long_size(pevent))) { /* * The commit field in the page is of type long, * use that instead, since it represents the kernel. diff --git a/tools/perf/util/trace-event.c b/tools/perf/util/trace-event.c index 116fffa788b9..eed1c11c1915 100644 --- a/tools/perf/util/trace-event.c +++ b/tools/perf/util/trace-event.c @@ -93,7 +93,7 @@ tp_format(const char *sys, const char *name) if (err) return ERR_PTR(err); - pevent_parse_format(pevent, &event, data, size, sys); + tep_parse_format(pevent, &event, data, size, sys); free(data); return event; -- 2.14.4