Received: by 10.213.65.68 with SMTP id h4csp1003056imn; Wed, 14 Mar 2018 06:51:57 -0700 (PDT) X-Google-Smtp-Source: AG47ELtoZowIO1I+LR6hONtZfEybdnVcbEBqRDn6gQFSbgmSiawfHm3senJHjLMylre0EnjeDN60 X-Received: by 2002:a17:902:6103:: with SMTP id t3-v6mr4219460plj.76.1521035517109; Wed, 14 Mar 2018 06:51:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521035517; cv=none; d=google.com; s=arc-20160816; b=B4tmncJXvGSrTo0A34mugHdx+ff7MH7aVvIhwMALhC3kSCHY/5bV3wJ99hEPUKjT1w LvPOWZSZgfLZjHIp2ajuHJV2LL7TsDkN0tPsLDzETwA5v5MfUBlVA8SoZbbcyi8mSF6c 5YwvVNE5G0JPGEH81BnuoXuiIBaeix5TUjtHDlx/FfG/0LlSTpQ1t+qCJtL70Ofom2EW e1deJdF05wYK3or5MH7jpSrFtrUk82ro94w7qjS5GU9gJgadcWhipP9+pjazCG6TRGwD WNiJa8qstkHE8pOeqwGvEAe3UYjSllh9wUSY5Rk0h7s9LxNeZxty5Zy2TRQjrrU3JW60 ZjXQ== 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 :dmarc-filter:arc-authentication-results; bh=6wO2u6qkbzn2uIlGZTgQhyvNirxmQdpX+ZJDPJb4y30=; b=k2WwIUMB+OuhCa2DJj9OgL5BO2lDFWU4xNMJS378qlcUW9+GB62v3EEsRYGILnX+JW nYJ9S81mBDmfflcqT3PVJUOGv+JvaBSvz29qj1t5VdwC9MlmG1QGJxaoenbucVtC8dkv 1pUx40dTNw8dX4Kdj3MO2kkzGcJNphpr+QP8wkIb05VKLW9nWlda58YLmw0kcFOmwsWJ 8uwMUInFlqaxTzthPw7jpNF3IZ6QqbBiK04BSNkwFv1UwqTDcVp9fX30vspqkzLO4mqG UQcGy0U/TPMBywdzgiJ2xOBkvluS4soduMrx4d6ADVTAvzm8P9iNlD3H8DCWMc9j2H9j QPxw== 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 h7si1868045pgc.663.2018.03.14.06.51.41; Wed, 14 Mar 2018 06:51:57 -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 S1751537AbeCNNua (ORCPT + 99 others); Wed, 14 Mar 2018 09:50:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:51508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751131AbeCNNu2 (ORCPT ); Wed, 14 Mar 2018 09:50:28 -0400 Received: from devbox (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (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 0AE772176E; Wed, 14 Mar 2018 13:50:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AE772176E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org Date: Wed, 14 Mar 2018 22:50:21 +0900 From: Masami Hiramatsu To: Ravi Bangoria Cc: oleg@redhat.com, peterz@infradead.org, srikar@linux.vnet.ibm.com, 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 Subject: Re: [PATCH 8/8] trace_uprobe/sdt: Document about reference counter Message-Id: <20180314225021.64109239de8b14b0aec1e1c5@kernel.org> In-Reply-To: <20180313125603.19819-9-ravi.bangoria@linux.vnet.ibm.com> References: <20180313125603.19819-1-ravi.bangoria@linux.vnet.ibm.com> <20180313125603.19819-9-ravi.bangoria@linux.vnet.ibm.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-redhat-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 Tue, 13 Mar 2018 18:26:03 +0530 Ravi Bangoria wrote: > No functionality changes. Please consider to describe what is this change and why, here. > > 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] Ah, OK in this context, [] means optional syntax :) > + -:[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 > -- Masami Hiramatsu