Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp798568yba; Thu, 9 May 2019 06:11:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwaoVNkPvF629gpjq441jq0fo9orMxjZVn9KqFJBfnnh0QdIXY+lgzEnnmc0jAC5hxdB+/5 X-Received: by 2002:a63:c14:: with SMTP id b20mr5280463pgl.163.1557407494011; Thu, 09 May 2019 06:11:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557407494; cv=none; d=google.com; s=arc-20160816; b=YAe0t1TePzMSMZHF3KlNDLfBVkir98xii/1yU5FZ5623sdvey+h1+rfyibMwLYBQLV k6daT7HeZKWZ8EIOnnd8Pf/RHemh+NmvZ9ZmJ0naN+a6jLWlHIHp8E0yOzghxY3tKTZB kdg1mgdDIVxTsdSVkyHjOsbOLua+7aOsOiolnOpLZhKDZylGcptMWTB+b0zxbo+aPyRY Mqy81TyfSsBmajSGht0irMUjLdUphqnLKfDkCRk85xJvVgN+G/IoA2gNAqC4tmDEbJQg FArQYUTZeAxLf+4KvP5goHloLt7TXk8wlfBcgUbN2lRlZD+iVkN/qy7LlIamwfOj2Vib VZNA== 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 :dkim-signature; bh=9+TH4GBKp0HqDurAyxqFahot73etjAkTXHOuAjVuQF4=; b=V/ACwJcsLz2AsM/NKwib4tgoJkvAZcZY9vE1WBoSHnaLiXt/bqh4duG8FEpVaqaagp BO4a5RanlGjSpUv7b5GhNUJb31vKHs5utYpxLbBf2d32t4TIf3NvCNNP8BXKm82vgg6W 9Uuo3AHt4foG8rVjwxPcLIpQpHR2XSneD+cTZ3+YSS7ZMqvZWIzHwSL85+f6x0bhMyEe dMsjpQt598izpqg+k/y1kcFsstTkG4uYvcCJKzxKnMzFlhK6DKaEkIOEq37ZhTY5D/ef X9r4FjnoJ+hdtCH/yHH26QwwgJIux8m0lDnZq5H2bBt/bI9vBGXc/mrBZ0QCPjaxSmMG m5kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vtQyiYdj; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w188si3092875pfd.204.2019.05.09.06.11.14; Thu, 09 May 2019 06:11: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; dkim=pass header.i=@kernel.org header.s=default header.b=vtQyiYdj; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726611AbfEINIe (ORCPT + 99 others); Thu, 9 May 2019 09:08:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:54598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726054AbfEINIe (ORCPT ); Thu, 9 May 2019 09:08:34 -0400 Received: from devnote2 (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 E59ED20863; Thu, 9 May 2019 13:08:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557407313; bh=zrmKkzoMIuE/clhTN2TYlbPBIaRnGtHv2cPtONL0Yo4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vtQyiYdjvSsEQ+EEewHQihL1fOU3SRptFyfB046JY0CxEzuwvhm8/BGu2n1kZo1Mz aZOMES30FSGfE2aFD081bjSCfBVRQRoBernNDWkJYxXxeiJB4Q+XFjwM9ov5t5gQjE P1uknazLzujb0XkmKQJPpF4esmCnt4EI9XBud/ro= Date: Thu, 9 May 2019 22:08:29 +0900 From: Masami Hiramatsu To: Cc: , , , , , Subject: Re: [PATCH] Documentation: {u,k}probes: add tracing_on before tracing Message-Id: <20190509220829.42cb21dc0555abe1de98df10@kernel.org> In-Reply-To: <1557397876-18153-1-git-send-email-lecopzer.chen@mediatek.com> References: <1557397876-18153-1-git-send-email-lecopzer.chen@mediatek.com> X-Mailer: Sylpheed 3.5.1 (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 Thu, 9 May 2019 18:31:16 +0800 wrote: > From: Lecopzer Chen > > After following the document step by step, the `cat trace` can't be > worked without enabling tracing_on and might mislead newbies about > the functionality. OK, but isn't tracing_on enabled by default? Anyway, it looks good to me (for making sure the trace is enabled). Acked-by: Masami Hiramatsu Thanks! > > Signed-off-by: Lecopzer Chen > --- > Documentation/trace/kprobetrace.rst | 6 ++++++ > Documentation/trace/uprobetracer.rst | 7 ++++++- > 2 files changed, 12 insertions(+), 1 deletion(-) > > diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst > index 235ce2ab131a..baa3c42ba2f4 100644 > --- a/Documentation/trace/kprobetrace.rst > +++ b/Documentation/trace/kprobetrace.rst > @@ -189,6 +189,12 @@ events, you need to enable it. > echo 1 > /sys/kernel/debug/tracing/events/kprobes/myprobe/enable > echo 1 > /sys/kernel/debug/tracing/events/kprobes/myretprobe/enable > > +Use the following command to start tracing in an interval. > +:: > + # echo 1 > tracing_on > + Open something... > + # echo 0 > tracing_on > + > And you can see the traced information via /sys/kernel/debug/tracing/trace. > :: > > diff --git a/Documentation/trace/uprobetracer.rst b/Documentation/trace/uprobetracer.rst > index 4346e23e3ae7..0b21305fabdc 100644 > --- a/Documentation/trace/uprobetracer.rst > +++ b/Documentation/trace/uprobetracer.rst > @@ -152,10 +152,15 @@ events, you need to enable it by:: > > # echo 1 > events/uprobes/enable > > -Lets disable the event after sleeping for some time. > +Lets start tracing, sleep for some time and stop tracing. > :: > > + # echo 1 > tracing_on > # sleep 20 > + # echo 0 > tracing_on > + > +Also, you can disable the event by:: > + > # echo 0 > events/uprobes/enable > > And you can see the traced information via /sys/kernel/debug/tracing/trace. > -- > 2.18.0 > -- Masami Hiramatsu