Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5943383ybi; Wed, 12 Jun 2019 11:07:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRjd+YKL9QN/VcTp2RPSJ/uejET3C7I26OlCHqrd+SO6/KZnIcggcxahEPUjt3TYvy5Rek X-Received: by 2002:a65:568d:: with SMTP id v13mr3427552pgs.144.1560362844298; Wed, 12 Jun 2019 11:07:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560362844; cv=none; d=google.com; s=arc-20160816; b=d7VRkOIHk1WWXTRCmFTtPgRp8due6Iv71nBa2KYTlCfOubaaAsqyUa+aIRG1KA20l6 6c18TClbhmq57NdD0ZrHW1AWcVcLSu2MJaWiaQE+8/qRfj7yr33GE4FhPrhZ1FWrrHQh BDE5uj16uaMx7XSIgXuz8+qB57/agk6/zOfxX7d+f2BS6eIyEpwHhjV3V/vrcDQR5jqa r+nJR81VJCLVXhMJ0YGhuIF1Bn/B0gc8A6l1SzXNWfOcyYF+zSMsE9ooJVL+jdJTO6ro /Yg22TyPML0t9fnrIg02jAWsVyUtxcliPknPgKC5g6umpI1u8HWWyqXHt4wG/eccX2AQ aUqw== 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; bh=e0diDWC7PgPkLtuNa1XykiwJl6YGS+qkfcq7ZuMLgXY=; b=Jb1Ahl6aAp2hpzFgD6bNFtgdjeMn2K6694vdhSDEjVA13tFTzzET4mC1QqVaa00j9A ujjfjprWiRPrlZQeUqWuZV/0mIAQ3lGc/oF7gYT8NWpqaaDM20KFJOTRS3DjIfpK2byx 24pErvbPMTQH5YcBK/FljxVaPmBCIP/jIWV07evEH7t/5TlKxnE0fVrAodcJVCUx0FMk IyiX5jIRuSQS+avXe22EIePFWhb/VvsnR2vNw9JEkkxLlOOv21ySRs11xeO4kHjDHOFf htQxjFd9KYUgHTanruzy23nBa7b0oDt4fK7PozBlcqyTxunp/9vWPgbvcxuJMPRCaVVs PV8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=tCaOTI7u; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k33si313951pld.359.2019.06.12.11.07.08; Wed, 12 Jun 2019 11:07:24 -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=@oracle.com header.s=corp-2018-07-02 header.b=tCaOTI7u; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502152AbfFLQf0 (ORCPT + 99 others); Wed, 12 Jun 2019 12:35:26 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:54420 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438224AbfFLQfZ (ORCPT ); Wed, 12 Jun 2019 12:35:25 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5CGYK6Q191951; Wed, 12 Jun 2019 16:34:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=e0diDWC7PgPkLtuNa1XykiwJl6YGS+qkfcq7ZuMLgXY=; b=tCaOTI7uz0XRLP+Ivuv+dBquMTtQZMjrfhQAuC+z1wl8l8LfZBUEncrJtMlpTed09h4L gU0Hg/aOSqM79PWK1pPyoufvvk9KFN2XiDrZSwHU3JsaZejkMuAVeJHmaBocqCw4TZI+ A9INjV9JBWDrs38FlX7xoNukeaSpOQwHQxTRRL7vdf33KYaQm67/yThwGJ1GCLGtVkSV IVNPkTDNM+9r9FCAClq9TyOFjYfXbMkjIkpSf9GVbda8a/2QQBb36bmMsJm1/F/7iqfu 21NKA0MuNzt3RlQA8Es+JzKzANbbfK/DCkIZY/qbzHI5v7DaO0LIX8yQL7tkCliT5/75 gA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 2t02hevv42-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Jun 2019 16:34:55 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5CGYp9O193920; Wed, 12 Jun 2019 16:34:54 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2t1jpj46ba-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Jun 2019 16:34:54 +0000 Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x5CGYs04018983; Wed, 12 Jun 2019 16:34:54 GMT Received: from ca-common-hq.us.oracle.com (/10.211.9.209) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 12 Jun 2019 09:34:53 -0700 From: Divya Indi To: linux-kernel@vger.kernel.org, Steven Rostedt Cc: Divya Indi , Srinivas Eeda , Aruna Ramakrishna Subject: [PATCH 1/3] tracing: Relevant changes for kernel access to Ftrace instances. Date: Wed, 12 Jun 2019 09:34:17 -0700 Message-Id: <1560357259-3497-2-git-send-email-divya.indi@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560357259-3497-1-git-send-email-divya.indi@oracle.com> References: <1560357259-3497-1-git-send-email-divya.indi@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9286 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906120112 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9286 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906120112 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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); 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; -- 1.8.3.1