Received: by 2002:a05:7412:85a1:b0:e2:908c:2ebd with SMTP id n33csp191764rdh; Mon, 30 Oct 2023 19:46:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGQq9pFP81DmDh87b8CMRCSzxS00rVGQ+S4+ut6C92uHbyZklTU1lXJ0Mnl4Vu9KG0FdonZ X-Received: by 2002:a05:6a20:e119:b0:16b:8498:7d29 with SMTP id kr25-20020a056a20e11900b0016b84987d29mr12106613pzb.27.1698720390806; Mon, 30 Oct 2023 19:46:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698720390; cv=none; d=google.com; s=arc-20160816; b=CG1JEpmeqF1eF4Vitbf4U4UEBmLO2ljGpZLGnPYJSB2npvwTW/ooF3bi7FfPFne3Iq AyEv9aPiLxIPxlqgEUfaCSZJRM6mHIac85M04W/2rDQMh15fqC5Xt9V12s/WIE0pxnAi Ithas2CUEN1JOyp0yd4vUAbt5OSQVn1NvTpEitvYl8VjehvdkvDDMWNAWBQUhxscU15f H0Oti6WPYooErBzlI7K21Fd3nt3OyLgnHRU3bZ2Mnj/A60fSDnN6XwUwzGNjTN7VF6mg dXsBBH3iSfBr9yqvmuB6DfTlT/owmdsXCpG+r7renmHXGL8UH1hDaK7lqtKhUSa85CId rDQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:mime-version :dkim-signature; bh=iEj8BMMHGmUiTt7opv9/MT6oAJvnqK3l5IxrH2wyANM=; fh=x/oW47wrTZFo3Z2CwVdQmgU83q0DkyYOmv48ec6xM9g=; b=tpQCRmJfpe6q8jWzhFccPZ4dgTFmN1riWFuucckNfM+lwlJ+nGuHLiRe0Y7HjkjBZZ JyygyDlJdSyhpovdlNZBdwk/BqPlRoTLzJyC619XpKGk8v080QSFYX++KpRCaP8SFCU2 4sIl2OHAROugOwTOO/BaB92X6F2DtuoC934ktqSLEYcM6X4blvw9hXhy5djL4R3PPOn/ HncFJAFIak2RTAK0iuHMBJsv5gEcJGwGQZp7iKCHfI3DfGhQ4OPaMcSwPATlEKJGq5KM T9Bx3rrv7pOPT1r51sNnndqDEXKQk3wKhvj2ICALebmDtbXmuNeQ5lm9UVFfyzk51pW1 49lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AJoIxtym; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id y19-20020a170902e19300b001c342073f76si305135pla.323.2023.10.30.19.46.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 19:46:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AJoIxtym; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 5726780412F3; Mon, 30 Oct 2023 19:46:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233193AbjJaCqM (ORCPT + 99 others); Mon, 30 Oct 2023 22:46:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230436AbjJaCqK (ORCPT ); Mon, 30 Oct 2023 22:46:10 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 846CBDA; Mon, 30 Oct 2023 19:46:06 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-d84f18e908aso4590309276.1; Mon, 30 Oct 2023 19:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698720365; x=1699325165; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=iEj8BMMHGmUiTt7opv9/MT6oAJvnqK3l5IxrH2wyANM=; b=AJoIxtymML6axJBQpvpN1gYhfJxMV6eTkhNFrgKAnBJL+WzZ8cid+8lb8/W68DPxAr RzMrQS+S+lEG0rkBfv2FL1PMiNc7OV0Xb2xkbS7ByzTcglx9eKKcwnyqyaB64Pf4a/ue J0oXomgcm84R0bFd0uRWOkqUwot2L6LONWiYXdXuySdPCjqG4Z+0VJ/jTKjiKxhVGXov WrzhenDBrkJKsI2SZqxJ2WiA0A8MxBE2f9gDlODUuPc7e9Vhl223yRbD0lYIIoqoXczl gMQgCDk/puOvY0EL/JMxOtjdCEUmKGKzCqWGdenzF2tVhcpe24lWNa4RmpjMz9ZVklU3 RGTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698720365; x=1699325165; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iEj8BMMHGmUiTt7opv9/MT6oAJvnqK3l5IxrH2wyANM=; b=ZjabDm5jF6siYqpWzPDaa4Ot0mYQ/T+WLXU5Y4o6XvwVOy86k+aiibC4x9XaH2LG0P P2FGqisLeuPa15GpqheaSxu2Mi0NUMBDfWWwlCYrRzecWY4mDnkKn4HdvQTyI6bmsr2G vhL2jdY7+1nPYaGIpNxWnoerGQgG8peSVTDy8QC9E/Yc0013wqQmj0hfEhqxJL8OCtP/ fYmyytO6dSUiHbzZtmY0QsHjH0nyh7+2HnB4rjBzxDjKevSWwIWGWcsBjhs8ihinxx61 sXmvbUU1SA0WPqEzQIr9ZeHBbQrKEBrViE2iC7JKTGRKHWD+jn89ylP7IhurEO/Fwj6k hnUQ== X-Gm-Message-State: AOJu0Yxu4ctJp6aP5J+OFoeuuFdohc6QGSOhy0tB9Cufu2vMG6bN4Wei 2suLwiZraBLP0qTmBrlh8LsueUCWmbq4MSdwsZo= X-Received: by 2002:a25:d784:0:b0:d7f:af26:2c7e with SMTP id o126-20020a25d784000000b00d7faf262c7emr10985759ybg.20.1698720365625; Mon, 30 Oct 2023 19:46:05 -0700 (PDT) MIME-Version: 1.0 From: renhai_lenovo Date: Tue, 31 Oct 2023 10:45:54 +0800 Message-ID: Subject: Update objtrace usage in Documentation/trace/events.rst To: xiehuan09@gmail.com Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-trace-kernel@vger.kernel.org, bagasdotme@gmail.com, "corbet@lwn.net" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 30 Oct 2023 19:46:24 -0700 (PDT) Documentation: trace/objtrace: Move the line entering the trace directory to the first step, so that the commands in the first step can be executed smoothly. Signed-off-by: Renhai diff --git a/Documentation/trace/events.rst b/Documentation/trace/events.rst index 52ac8ca8ab64..d5fadf7966de 100644 --- a/Documentation/trace/events.rst +++ b/Documentation/trace/events.rst @@ -583,6 +583,7 @@ The following commands are supported: .. code-block:: + # cd /sys/kernel/debug/tracing/ # echo 'p bio_add_page arg1=$arg1' > ./kprobe_events Secondly, we can get the value dynamically based on the object: @@ -597,7 +598,6 @@ The following commands are supported: # echo 'objtrace:add:arg1,0x28:u32:1 if comm == "cat"' > ./events/kprobes/ \ p_bio_add_page_0/trigger - # cd /sys/kernel/debug/tracing/ # echo 'p bio_add_page arg1=$arg1' > ./kprobe_events # echo 'objtrace:add:arg1,0x28:u32:1 if comm == "cat"' > ./events/kprobes/p_bio_add_page_0/trigger