Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp909749imm; Wed, 15 Aug 2018 08:10:32 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwQgtzFZL9VMs2KdYEtcpgtULBuLB5nXmZd0YOc3liL5nPjGFJuS/pAQipY3s9IVCZ4+pH+ X-Received: by 2002:a63:e318:: with SMTP id f24-v6mr25016202pgh.175.1534345832153; Wed, 15 Aug 2018 08:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534345832; cv=none; d=google.com; s=arc-20160816; b=oNGtbISq2L+T8CRzij8SFLe3KwqFeyEEEFcziwko+sXaaACgdt2iZsYuOoI79MlVz8 gzOoIA1vUgbj0cVkBbHbTRdRoRcbQ6YKxR39Kj9J4iDiy8TOQxHsz4nnFhkJwqVW8QUr FM5/s0GprCa0VFAQDewvs+n7IGQKjxFkBrjHX/gHhMxg+1hVKsyNz2WTq0aV0BRB3QgQ 28tvQczWfFgMk5hKpxw48x7VfmEdCsOaOeRbHOBmPZr0B4G3iXA6yocgz228nq8VdzVq yiCOS5bvGwYZ3uSqMPSD92OKPrZDDKCywYkF/F1t3EcVriF631Zjytp9zeWhQo9MFq19 yM/Q== 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=3vONOKhovZSG6EihGtVhw0qTfBTnrL9ZqhEXzSkDSqM=; b=zGM6gIo6exqpphJpB4xChtwDWwnFU6WqaTyLsOe4GJFf/NW/Yfq7EZ/gSZT2iCF54Q DBzxRVL7Y1CT0tFIe9+EZxjAr3UEJqfaMBiFiP/0aNEs454zxlh8ro3U8WGc3LJEwzda eTIDIC+pY9yyycpGw/f3ImDje5dzS8BYodw+37qikipKKT0/zQCK1DIbMmOg5MMlhaCL JxqA8JcH3lPopdiFmfqmZq23Ht5LsTJKXhEcFAPam3dnOKHgb9TRWqxs6lGvsEKhsq2H Kts5n/gliqv0YQIgWYBreN2jjrgoZmmBT0/XsNJ6sk2sNYqMluzGSHSIWiqywzhO+5hE oQZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iAyxbOCI; 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 f7-v6si19704445pgp.496.2018.08.15.08.10.16; Wed, 15 Aug 2018 08:10:32 -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=iAyxbOCI; 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 S1730563AbeHOSAy (ORCPT + 99 others); Wed, 15 Aug 2018 14:00:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:50736 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730492AbeHOSAy (ORCPT ); Wed, 15 Aug 2018 14:00:54 -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 7388021475; Wed, 15 Aug 2018 15:08:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1534345700; bh=q8bvvABgJx+Zo0sbL3rcPLJGSHBYFXX0bAm80V9dztw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iAyxbOCIlMtk/B4RV03IuGz1M5Uf1B/8MpyfdZk6rntf2SPqWFs8vWRBN5gWyvc/y WKUv2ShZfFIdJKqThdwEeQ5d9xVTM0Z+SZ+HRWBogEL5nvAMF03Pzqu4S+LA/yW4lO 8Qu1FYZigg6o7v4we2RFgT6DbOVAn+zEL1Fo1a6A= 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 25/35] tools lib traceevent: Rename static variables and functions in event-parse.c Date: Wed, 15 Aug 2018 12:06:01 -0300 Message-Id: <20180815150611.32080-26-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 static variables and functions in event-parse.c: pevent_func_params, __pevent_parse_format, __pevent_parse_event, pevent_error_str, pevent_search_event 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/20180808180703.575392642@goodmis.org Signed-off-by: Steven Rostedt Signed-off-by: Arnaldo Carvalho de Melo --- tools/lib/traceevent/event-parse.c | 54 +++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index f723c088acca..6313e32680ff 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c @@ -92,9 +92,9 @@ struct event_handler { void *context; }; -struct pevent_func_params { - struct pevent_func_params *next; - enum tep_func_arg_type type; +struct func_params { + struct func_params *next; + enum tep_func_arg_type type; }; struct tep_function_handler { @@ -102,7 +102,7 @@ struct tep_function_handler { enum tep_func_arg_type ret_type; char *name; tep_func_handler func; - struct pevent_func_params *params; + struct func_params *params; int nr_args; }; @@ -1161,7 +1161,7 @@ static enum event_type read_token(char **tok) * @tok: The token to return * * This will parse tokens from the string given by - * pevent_init_data(). + * tep_init_data(). * * Returns the token type. */ @@ -4133,7 +4133,7 @@ process_defined_func(struct trace_seq *s, void *data, int size, struct event_format *event, struct print_arg *arg) { struct tep_function_handler *func_handle = arg->func.func; - struct pevent_func_params *param; + struct func_params *param; unsigned long long *args; unsigned long long ret; struct print_arg *farg; @@ -6023,7 +6023,7 @@ static int find_event_handle(struct tep_handle *pevent, struct event_format *eve } /** - * __pevent_parse_format - parse the event format + * __tep_parse_format - parse the event format * @buf: the buffer storing the event format string * @size: the size of @buf * @sys: the system the event belongs to @@ -6035,9 +6035,9 @@ static int find_event_handle(struct tep_handle *pevent, struct event_format *eve * * /sys/kernel/debug/tracing/events/.../.../format */ -enum tep_errno __pevent_parse_format(struct event_format **eventp, - struct tep_handle *pevent, const char *buf, - unsigned long size, const char *sys) +enum tep_errno __tep_parse_format(struct event_format **eventp, + struct tep_handle *pevent, const char *buf, + unsigned long size, const char *sys) { struct event_format *event; int ret; @@ -6143,12 +6143,12 @@ enum tep_errno __pevent_parse_format(struct event_format **eventp, } static enum tep_errno -__pevent_parse_event(struct tep_handle *pevent, - struct event_format **eventp, - const char *buf, unsigned long size, - const char *sys) +__parse_event(struct tep_handle *pevent, + struct event_format **eventp, + const char *buf, unsigned long size, + const char *sys) { - int ret = __pevent_parse_format(eventp, pevent, buf, size, sys); + int ret = __tep_parse_format(eventp, pevent, buf, size, sys); struct event_format *event = *eventp; if (event == NULL) @@ -6190,7 +6190,7 @@ enum tep_errno tep_parse_format(struct tep_handle *pevent, const char *buf, unsigned long size, const char *sys) { - return __pevent_parse_event(pevent, eventp, buf, size, sys); + return __parse_event(pevent, eventp, buf, size, sys); } /** @@ -6211,12 +6211,12 @@ enum tep_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); + return __parse_event(pevent, &event, buf, size, sys); } #undef _PE #define _PE(code, str) str -static const char * const pevent_error_str[] = { +static const char * const tep_error_str[] = { TEP_ERRORS }; #undef _PE @@ -6237,7 +6237,7 @@ int tep_strerror(struct tep_handle *pevent __maybe_unused, return -1; idx = errnum - __TEP_ERRNO__START - 1; - msg = pevent_error_str[idx]; + msg = tep_error_str[idx]; snprintf(buf, buflen, "%s", msg); return 0; @@ -6463,7 +6463,7 @@ int tep_print_func_field(struct trace_seq *s, const char *fmt, static void free_func_handle(struct tep_function_handler *func) { - struct pevent_func_params *params; + struct func_params *params; free(func->name); @@ -6497,8 +6497,8 @@ int tep_register_print_function(struct tep_handle *pevent, char *name, ...) { struct tep_function_handler *func_handle; - struct pevent_func_params **next_param; - struct pevent_func_params *param; + struct func_params **next_param; + struct func_params *param; enum tep_func_arg_type type; va_list ap; int ret; @@ -6591,9 +6591,9 @@ int tep_unregister_print_function(struct tep_handle *pevent, return -1; } -static struct event_format *pevent_search_event(struct tep_handle *pevent, int id, - const char *sys_name, - const char *event_name) +static struct event_format *search_event(struct tep_handle *pevent, int id, + const char *sys_name, + const char *event_name) { struct event_format *event; @@ -6638,7 +6638,7 @@ int tep_register_event_handler(struct tep_handle *pevent, int id, struct event_format *event; struct event_handler *handle; - event = pevent_search_event(pevent, id, sys_name, event_name); + event = search_event(pevent, id, sys_name, event_name); if (event == NULL) goto not_found; @@ -6723,7 +6723,7 @@ int tep_unregister_event_handler(struct tep_handle *pevent, int id, struct event_handler *handle; struct event_handler **next; - event = pevent_search_event(pevent, id, sys_name, event_name); + event = search_event(pevent, id, sys_name, event_name); if (event == NULL) goto not_found; -- 2.14.4