Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2366600ybc; Wed, 13 Nov 2019 13:19:29 -0800 (PST) X-Google-Smtp-Source: APXvYqwLdNLFslyIjBOrCFN0omd2+KhjBSwZoumzzbuK+i2+suQ7BRNX7BDe1WVfTsSERiIuQxaH X-Received: by 2002:a17:906:970a:: with SMTP id k10mr4774297ejx.314.1573679969551; Wed, 13 Nov 2019 13:19:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573679969; cv=none; d=google.com; s=arc-20160816; b=ltb7oRyO76pS1+nRq4x9w0pQa3kPAiLrxfdBLkqDxijE244yR5PJ6WifVeb2TkDdIt h+xuYsAUtmFAzLeWK0yIiSvWJtVJ7llmopXavy52N81+vDS63SQfIRJC0F86QKo2hejo d2B47CGETjk+ZYHPCfI7r+doIQM32tv9BCELy+4UkV1uHjzTDNYE+WcHUcsrh/1LbUj8 twLDttqAbLpvCfub1T7/iCfRBXJRRHAsvCsU2eXm27OgIVOTiCVwnm9HPlfxoEEl7yyf mBgKx29fBx6BehPja0QFvI80J8TGpT4ib0kiEQz2sHRaNFd4GoENRUVz7Xz/15Y66GM0 +Bhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=pIR/fCCWbp3TXnn+eHo9zj2GQqY5GlxleqQj0nAeXJs=; b=Edv7tHufjBvMqG83y5Qe16i5bQ483ThnYzr3RZSGrlt4VVtBITHjJmGnQvlm6Ymxyd GOX2IGxghIgnDE9Zgszli/bb3kaIBwx8BpGqziLnz0Egru9R8H8NAN/7JWyF5eCbuhpy QH2Z7HO2UUekQcZ2KPzZF66gVvvZ1jAT3VkoYpoHwkwlj0hzI0MkaSrZAUZsdekPydwX Hp5qni2Eljmnzth2S74Y0eBVcyg0D7WshSDdpalIiFRtidtmh0PvXW59qyS/g4KbhD3h BKTBtH/sto/HBWtKYsxEYz1yCntrXLTqGvAVXH+Zeg+eHSueA64uIDPoC1afUUP7nhpT SJ+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=mAfM23Hm; 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 y17si1892693ejc.360.2019.11.13.13.19.05; Wed, 13 Nov 2019 13:19:29 -0800 (PST) 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-2019-08-05 header.b=mAfM23Hm; 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 S1726605AbfKMVR0 (ORCPT + 99 others); Wed, 13 Nov 2019 16:17:26 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:56770 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726162AbfKMVR0 (ORCPT ); Wed, 13 Nov 2019 16:17:26 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xADL40nR056673; Wed, 13 Nov 2019 21:16:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2019-08-05; bh=pIR/fCCWbp3TXnn+eHo9zj2GQqY5GlxleqQj0nAeXJs=; b=mAfM23HmvKNeVZqPC0qBtwQIE73LIu93H2orzToHLW1jstjahcr+mYIejFI31G21BAFm adTWC4/oS8UvVw51wGLuHjo9Ks5MFsauZ45nsgC5AaA0fVCqkJxbNJZ7La45zBfXTuso 4+4G1c6vTslNpIayUWJJDD0nyAjpZBxYHo+AkQTiKoS+efSEFgWFodzCyRAIXfz80wMs d4y3CMSpIAskSdrhgG3BYnb/21oGdbV7bRk25eyuKrLL6GUQTH1UEhwLP8K3mfGMoBuj 4VCIyBD0ZpomdVKCndqfqPHKcZfhNavwNTk9wFKXdRETgKu1hxbl4rzSU4wZt6rL7N1u MA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2w5ndqfadd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Nov 2019 21:16:58 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xADL3weL170475; Wed, 13 Nov 2019 21:16:57 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 2w8g18768t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Nov 2019 21:16:57 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id xADLGukB015416; Wed, 13 Nov 2019 21:16:56 GMT Received: from ca-common-hq.us.oracle.com (/10.211.9.209) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 13 Nov 2019 13:16:56 -0800 From: Divya Indi To: Steven Rostedt , linux-kernel@vger.kernel.org Cc: Divya Indi , Aruna Ramakrishna , Srinivas Eeda , Joe Jin , Manjunath Patil Subject: [RFC v4] Kernel access to ftrace instances. Date: Wed, 13 Nov 2019 13:15:57 -0800 Message-Id: <1573679762-7774-1-git-send-email-divya.indi@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9440 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=588 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1910280000 definitions=main-1911130175 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9440 signatures=668685 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=653 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1910280000 definitions=main-1911130175 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Please review the patches that follow - [PATCH 1/5] tracing: Declare newly exported APIs in include/linux/trace.h [PATCH 2/5] tracing: Verify if trace array exists before destroying it. [PATCH 3/5] tracing: Adding NULL checks [PATCH 4/5] tracing: Adding new functions for kernel access to Ftrace instances. [PATCH 5/5] tracing: Sample module to demonstrate kernel access to Ftrace instances. This patchset addresses the feedback recieved for v3. Changes from v3 include - 1) trace_array_get_by_name() replaces trace_array_lookup and with its new implementation we no longer need to export trace_array_create(). If a trace array with given name exists, this func returns a pointer to this trace array (Previously, trace_array_lookup()). If does not exist, create a new trace array (Previously done by trace_array_create()). 2) A new trace array will always have ref ctr = 1 on creation. Destroying a trace array will require its ref ctr to be 1. 3) trace_array_set_clr_event(): Uses boolean instead of 0/1 to enable/disable events to a trace array. 4) Sample module reflects the above changes. It is now part of the same patch-set. Thanks, Divya