Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp626436yba; Thu, 9 May 2019 03:32:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwj+9oTLe++gn24xfDc3/0EWSexiOj/VD7NOx6mIBHBiAPtRS2rDWyKO2EKkoS+N6mPEBvd X-Received: by 2002:a63:d816:: with SMTP id b22mr4320992pgh.16.1557397975991; Thu, 09 May 2019 03:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557397975; cv=none; d=google.com; s=arc-20160816; b=T7GlfMeT4iVTLZBD9Ws4j2HB8T0rzbywNoAYgXqybvxYXzcZTk2e3TqR3rpUHD3wCt l0ot76H7Qcd0iqN+mLCfSUj7MCwN8Gcbmr68SmDzutsZfC75FotQ8uv5RBg07/BFmOTk FsrW44rI8Hwp0qzp242yhREC23zyfqy46WsOKmzCDBK3pO3tt638c2KjE5n1nd85fGyM V//kHqL4aKYxXShW0Rab+4unQ4+5JXDzqrnfDDG3Vl0lwIexbZjDMCok70gCmSV0FMuk uSRi0ORG2r3lsxeta4dz0tXR05LjwQg5EB6wEtNRb+EeMT8BWlskZiHX0CV6cla/8Uc/ ungQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=jdMf+lu1x1prhReSGaEYZHvw8s9sYay6nKPAOD/ALPc=; b=QV2GglywXIdDPrDmrCvWywCjkdqw4NDjajAhJuRp6fj2afphUqCyn0Oq6BmdJb2WuN rzdy0gXCIvcm17XEK0fnYMkpeYVU+LSOQIDYiJ92gjMuASr3De3ik5OrZA7XaG0tTfPI Suj1EOfOjtJnTUSQ7eZFDKfW1Ji9SRU80ZOr64rt/IQWs9MmveVcgC9N4BiUU2uC+QYB KOECVvpzpKbzuMrGRaAr8y+SeoCefVSKtAnwZW5i69ef0qFi+OtEw9qFLOeF6sMgW7D7 r2RH54aTGQ6vM1oYbH8vyE/BOQA5+CV4QNtBl3+zilBldVMaKK560G+Pv+l2bkhU0NPu yIzw== 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 h89si2015256pld.367.2019.05.09.03.32.39; Thu, 09 May 2019 03:32:55 -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 S1726491AbfEIKbv (ORCPT + 99 others); Thu, 9 May 2019 06:31:51 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:33223 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725892AbfEIKbu (ORCPT ); Thu, 9 May 2019 06:31:50 -0400 X-UUID: 49b54b4d4c1e425091c7a2b3e6c30802-20190509 X-UUID: 49b54b4d4c1e425091c7a2b3e6c30802-20190509 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1425517763; Thu, 09 May 2019 18:31:39 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 9 May 2019 18:31:38 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 9 May 2019 18:31:38 +0800 From: To: , CC: , , , , Lecopzer Chen Subject: [PATCH] Documentation: {u,k}probes: add tracing_on before tracing Date: Thu, 9 May 2019 18:31:16 +0800 Message-ID: <1557397876-18153-1-git-send-email-lecopzer.chen@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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