Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3099041ybi; Mon, 17 Jun 2019 16:34:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzI3VLzqiuNj7Dy33GmS0nIxv4rEuPMYZRyRLZnMoseSoVYP8k6BEuW6MHQL1PpDs02IDak X-Received: by 2002:a17:902:2f:: with SMTP id 44mr49363612pla.5.1560814495621; Mon, 17 Jun 2019 16:34:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560814495; cv=none; d=google.com; s=arc-20160816; b=wM8Drp/bdGG9pxKMicnSdBciz0JzTE2m+/SmmL2tyiy6rSHB3zSLZ/njkf0P+k3CNx ycCQRzc+KiLNW42VVMgxiRqRhp800+ZG2H8pVTEdM4q0V61slr9gNW/9CDF131IUXVno Y/OWAWEk2j6SpuI+FZ5eCq4OO24obOQaYN9Fg2gY0XFwWrJybnrTpNvq4KYYb032tns5 fgNfbi3RtmtzjDKoBSfGdn8n/MtvbAW67NyBQbeX/tzXFfMRj4PpC5QjpKtt8+VRQosl PqBr6v1NGMVF3CUAkSZVBI2CgfSlb+4XuQJzt/Z9nK24pXOglayxRaFp6Kx2LldX9chR aLKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=CVWCTdTDc5yA35zWMA2BHVUmjJk8GRfzOZF1hq6sSMY=; b=YoEY7CijouBNltK3GNADmAdhp7+trfabY2ynKRZrjgM9MlpUkh8g4BuPXI9nPDA/Y6 lVchDFpgtLsrl9JbcPOnvYHGttFD0aPPCotTqWLIiB4aBKckkgZefqw7J+QwhGp31DIi Yy7KAIXGl9i8+D5dLcJ3E5jlrn9Y6VbwazOuMTac/yEjVlcEDtaBPvIkzpERSL06hRgQ l577senfTptzM2jBD8tIMLeom4Ls9QjDt5pjzZlZhiCKYkFTPAqL3SwumQgCi4kNaPA4 OiSV45h1bGEQtL8OpzkMdHWawnXt41vtfjVkJJ3hPOsE1SI0SZNyOTRFPeiOkZ0paPMb VXfg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si11387832pli.427.2019.06.17.16.34.40; Mon, 17 Jun 2019 16:34:55 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728950AbfFQXeR (ORCPT + 99 others); Mon, 17 Jun 2019 19:34:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:37808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727821AbfFQXeR (ORCPT ); Mon, 17 Jun 2019 19:34:17 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 D2788208C0; Mon, 17 Jun 2019 23:34:15 +0000 (UTC) Date: Mon, 17 Jun 2019 19:34:14 -0400 From: Steven Rostedt To: Divya Indi Cc: linux-kernel@vger.kernel.org, Srinivas Eeda , Aruna Ramakrishna Subject: Re: [PATCH 1/3] tracing: Relevant changes for kernel access to Ftrace instances. Message-ID: <20190617193414.6bc6d5e4@gandalf.local.home> In-Reply-To: <1560357259-3497-2-git-send-email-divya.indi@oracle.com> References: <1560357259-3497-1-git-send-email-divya.indi@oracle.com> <1560357259-3497-2-git-send-email-divya.indi@oracle.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 12 Jun 2019 09:34:17 -0700 Divya Indi wrote: Hi Divya, First, make sure the patches are all replied to the cover patch [0/3]. That is, patch 1, 2 and 3 should all be in reply to [0/3] to see a all the patches at the same level, and that makes replies easy to stand out. Having patch 2 a reply to patch 1 and patch 3 a reply to patch 2, makes it hard to see what comments are for what patches. > For commit f45d1225adb0 ("tracing: Kernel access to Ftrace instances") > Adding the following changes to ensure other kernel components can > use these functions - > 1) Remove static keyword for newly exported fn - ftrace_set_clr_event. > 2) Add the req functions to header file include/linux/trace_events.h. The above change log is hard to parse. The "Adding" looks to be a start of a new sentence, and what changes and what components can use these functions? Also avoid shorten words ("fn", "req") that just makes trying to figure out what is being said that more confusing. > > Signed-off-by: Divya Indi > --- > include/linux/trace_events.h | 6 ++++++ > kernel/trace/trace_events.c | 2 +- > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h > index 8a62731..d7b7d85 100644 > --- a/include/linux/trace_events.h > +++ b/include/linux/trace_events.h > @@ -539,6 +539,12 @@ extern int trace_define_field(struct trace_event_call *call, const char *type, > > #define is_signed_type(type) (((type)(-1)) < (type)1) > > +void trace_printk_init_buffers(void); > +int trace_array_printk(struct trace_array *tr, unsigned long ip, > + const char *fmt, ...); > +struct trace_array *trace_array_create(const char *name); > +int trace_array_destroy(struct trace_array *tr); > +int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set); These function are declared elsewhere. If we are adding them here, then they should be removed from the other places. But trace_events.h is not the proper place to put these. The trace_events.h file is only for code used in the TRACE_EVENT() macros. The proper file is include/linux/trace.h -- Steve > int trace_set_clr_event(const char *system, const char *event, int set); > > /* > diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c > index 0ce3db6..b6b4618 100644 > --- a/kernel/trace/trace_events.c > +++ b/kernel/trace/trace_events.c > @@ -795,7 +795,7 @@ static int __ftrace_set_clr_event(struct trace_array *tr, const char *match, > return ret; > } > > -static int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set) > +int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set) > { > char *event = NULL, *sub = NULL, *match; > int ret;