Received: by 10.213.65.68 with SMTP id h4csp331631imn; Tue, 13 Mar 2018 05:57:34 -0700 (PDT) X-Google-Smtp-Source: AG47ELukrZSprBgOcdmI74ntIMUkjeoMka+HUEV/r6l3WAzRkpoKI1ZG67DFRyoTmTbvDqGyb0mj X-Received: by 10.98.82.144 with SMTP id g138mr490808pfb.239.1520945854451; Tue, 13 Mar 2018 05:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520945854; cv=none; d=google.com; s=arc-20160816; b=QV6eQAa6OuID0znvuyicZwHTyag4yZNVnqPROfI+h0jl9COxNsalY5ElyAvibYN6mA PcEqrNyevdji7B/y9QsuDQ8oRPuQiIPvo3RFdI/UczaS86uxVFN7ZdKC1a5ZlR4u0H6R zhZ0Txr/v3PhWk05wmnSiLgJ7Y9P1QihRjGKhssZeSTjOCn/S3oNGaRvagaOXeSBW+oK Na6rES0K9FO8Po3LJmEq6/e+N8RQGRYRAOzbkSZTeEgAaClPIl9E5dJzz7hqRczerq4y pDuWyN352AlY5+WKOMYn/NmgM7XFYjkZ2W989wgq2oyWUv2I6WCMyV/pAvckegmn1gbw b+hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=0uryX3yqfID8k/gJvxPL1S1vocT4sejXhk351X/JsFQ=; b=KTaA4BXWmQ8sJMcyidbHfS7rLXXmhKDTJyXu1UPS0TFBnrBnWGuo0reHRuPaTC/jJ+ m+lwdlWDqlpLs7/F/Z8gQWuCUJCQhcRXgrFZbSbbR7FtixQ+B+iBpIs/pWCjaNfYshXE FbJkhPtJnZoCuGlh1GXlZxZMrG8ooCYv5Rpmm1oje0F3BVPNPkyfmrTM5YkXZl4Dl38S GYuac2ZzR4vSubppUEL5HsohGSeuUcxHn8ECAU9/HtdlHwMGCmH5Wrj7bao5shRtYcX3 g6yAYoevJW3BlGHBtU4Xhs2BFSwP1a4nDInU8VKKfwh4TyCcpjkim13GMYdtlRr6SS/c X53g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g125si57771pgc.738.2018.03.13.05.57.19; Tue, 13 Mar 2018 05:57:34 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752718AbeCMMzx (ORCPT + 99 others); Tue, 13 Mar 2018 08:55:53 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56482 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752301AbeCMMzv (ORCPT ); Tue, 13 Mar 2018 08:55:51 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2DCseVM085414 for ; Tue, 13 Mar 2018 08:55:51 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gpeu6rqfy-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Tue, 13 Mar 2018 08:55:51 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Mar 2018 12:55:48 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 13 Mar 2018 12:55:40 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2DCte4355705788; Tue, 13 Mar 2018 12:55:40 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C148611C04A; Tue, 13 Mar 2018 12:48:19 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 219DC11C04C; Tue, 13 Mar 2018 12:48:08 +0000 (GMT) Received: from bangoria.in.ibm.com (unknown [9.124.221.140]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 13 Mar 2018 12:48:07 +0000 (GMT) From: Ravi Bangoria To: mhiramat@kernel.org, oleg@redhat.com, peterz@infradead.org, srikar@linux.vnet.ibm.com Cc: acme@kernel.org, ananth@linux.vnet.ibm.com, akpm@linux-foundation.org, alexander.shishkin@linux.intel.com, alexis.berlemont@gmail.com, corbet@lwn.net, dan.j.williams@intel.com, gregkh@linuxfoundation.org, huawei.libin@huawei.com, hughd@google.com, jack@suse.cz, jglisse@redhat.com, jolsa@redhat.com, kan.liang@intel.com, kirill.shutemov@linux.intel.com, kjlx@templeofstupid.com, kstewart@linuxfoundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhocko@suse.com, milian.wolff@kdab.com, mingo@redhat.com, namhyung@kernel.org, naveen.n.rao@linux.vnet.ibm.com, pc@us.ibm.com, pombredanne@nexb.com, rostedt@goodmis.org, tglx@linutronix.de, tmricht@linux.vnet.ibm.com, willy@infradead.org, yao.jin@linux.intel.com, fengguang.wu@intel.com, Ravi Bangoria Subject: [PATCH 8/8] trace_uprobe/sdt: Document about reference counter Date: Tue, 13 Mar 2018 18:26:03 +0530 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180313125603.19819-1-ravi.bangoria@linux.vnet.ibm.com> References: <20180313125603.19819-1-ravi.bangoria@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18031312-0040-0000-0000-0000041F00AA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031312-0041-0000-0000-000026222B91 Message-Id: <20180313125603.19819-9-ravi.bangoria@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-13_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803130154 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No functionality changes. Signed-off-by: Ravi Bangoria --- Documentation/trace/uprobetracer.txt | 16 +++++++++++++--- kernel/trace/trace.c | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Documentation/trace/uprobetracer.txt b/Documentation/trace/uprobetracer.txt index bf526a7c..8fb13b0 100644 --- a/Documentation/trace/uprobetracer.txt +++ b/Documentation/trace/uprobetracer.txt @@ -19,15 +19,25 @@ user to calculate the offset of the probepoint in the object. Synopsis of uprobe_tracer ------------------------- - p[:[GRP/]EVENT] PATH:OFFSET [FETCHARGS] : Set a uprobe - r[:[GRP/]EVENT] PATH:OFFSET [FETCHARGS] : Set a return uprobe (uretprobe) - -:[GRP/]EVENT : Clear uprobe or uretprobe event + p[:[GRP/]EVENT] PATH:OFFSET[(REF_CTR_OFFSET)] [FETCHARGS] + r[:[GRP/]EVENT] PATH:OFFSET[(REF_CTR_OFFSET)] [FETCHARGS] + -:[GRP/]EVENT + + p : Set a uprobe + r : Set a return uprobe (uretprobe) + - : Clear uprobe or uretprobe event GRP : Group name. If omitted, "uprobes" is the default value. EVENT : Event name. If omitted, the event name is generated based on PATH+OFFSET. PATH : Path to an executable or a library. OFFSET : Offset where the probe is inserted. + REF_CTR_OFFSET: Reference counter offset. Optional field. Reference count + gate the invocation of probe. If present, by default + reference count is 0. Kernel needs to increment it before + tracing the probe and decrement it when done. This is + identical to semaphore in Userspace Statically Defined + Tracepoints (USDT). FETCHARGS : Arguments. Each probe can have up to 128 args. %REG : Fetch register REG diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 20a2300..2104d03 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -4604,7 +4604,7 @@ static int tracing_trace_options_open(struct inode *inode, struct file *file) "place (kretprobe): [:][+]|\n" #endif #ifdef CONFIG_UPROBE_EVENTS - "\t place: :\n" + " place (uprobe): :[(ref_ctr_offset)]\n" #endif "\t args: =fetcharg[:type]\n" "\t fetcharg: %, @
, @[+|-],\n" -- 1.8.3.1