Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2201229ybl; Thu, 5 Dec 2019 13:54:06 -0800 (PST) X-Google-Smtp-Source: APXvYqx1NIXAfskmPT7E6mWYbS8nKxWgiK9K/OKrTfQw/B9V/O8/g6Kj7coQ62qe807DTUmNHJmF X-Received: by 2002:aca:52c7:: with SMTP id g190mr9080513oib.84.1575582846134; Thu, 05 Dec 2019 13:54:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575582846; cv=none; d=google.com; s=arc-20160816; b=hWpBRGqRM+bX38q2044PfJZFlXg+wnOEOLN1yda15Xtaew3sEyPpHWk1WvouJwNfm2 /vpUMdMf+LJXfHOQ1+4pSztsZBpEHBFwt8CZQkm0r9A51owviCL+0q7+RfdHnFnNqF98 D9DkLp1XUeppo9ble4tyIoxA9R9aphBKazz215K6Bv6iHGGyajONkHB4PmBnCHVTGPvj q0aPbB0YndJipkAfsSbEPa80LWB+Fent7LrSb+cNZ5aPBqHN3GQ6uuIoXfyn4tcF1hyw hshIWDuHV258o9VI7y92GHzAyurlHENwE6Jrze2XsHD/OYYgViVXV8TeazAEwbTiQLbj R86A== 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:date:subject:cc:to:from :dkim-signature; bh=+DItobioE2v0mcjvG7rtQWbeO2Gh9dZ5P9FoUFdI1r8=; b=qO+l+fGdznTJikmv1eGh/gC4EuvgR1REnHBGeWHDidKqo8OequeAQ/Tj8VD/hp0ohR xy73b4W/gT0GmdSish9hQKsZ6zN7dg4e0dKzZ1Hl0CV5Au9w22kiM4ZQBBlcIy8HmH3h PkyL9vz9zxm6m0kdzDUrs7BWKGvVhQKCtFPLzFGQCs5Ao5QolAIdaD+ygl8SFI7leHH3 A2GZ3jSYPJ49CuwuZKhfmx5vnKT39WzyHYHdV9sN89RjgMEJc83bPjNzOh43zVg6pZbq nQI/dRbWApRD1/HErXJt4+uy0XfRK/vQ5Zn7eJ97/flFgCS3xDE9T/3OQuNRTciT0ylz lUiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dPQL7iwe; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si5821364oie.22.2019.12.05.13.53.54; Thu, 05 Dec 2019 13:54:06 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=dPQL7iwe; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387538AbfLEVwx (ORCPT + 99 others); Thu, 5 Dec 2019 16:52:53 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:44570 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387525AbfLEVwu (ORCPT ); Thu, 5 Dec 2019 16:52:50 -0500 Received: by mail-io1-f68.google.com with SMTP id z23so5192298iog.11; Thu, 05 Dec 2019 13:52:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+DItobioE2v0mcjvG7rtQWbeO2Gh9dZ5P9FoUFdI1r8=; b=dPQL7iwe36qPjYatnqnyMK7+wQcq/+GaIbuumJSYp+Odzdr29W4dj+1GMvZFPEkLfM oNmNdpZg2sTDEI/oKXIUKo/HKR99JM9odseNtG5FtKpfeB3k04kTZE8xpQ+wh5sgowmC rTTgQqq+7LfhVB7gPQrOSEilZFv/rYaMluz46geLr/ut3X6TD0GA59ekD4poXUrDF2xK JxQbqtw1xXN3GtclgVuveNgkX+MVDUwTgno7kM2POx4KSLcyFjR/0mqxaBQWPeNb4h3M 2KOlJM2pkKbOGvU7dIk430gVwcAPLnk6jaIEJ52jc5zAzoml8pZDPymIughrtVJHuG1F 1ddQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+DItobioE2v0mcjvG7rtQWbeO2Gh9dZ5P9FoUFdI1r8=; b=oj9G1pWGxjYV82LZliWlCqnvmBwzftC2KOB1aWDLCB1GxQdifuyLP0rWHFDsBOVyrB SQz8fmog3gVS7IHJUpE20Tf5emQ3ATSQZLuv3q5+SzRzmqkgCYelF1xnu8IfMHJEvNPa QoijkMXAwauICHEFCxACR5o+4cNGnQ6BQbK7w4z/mnML2xGjshtJ3TrIpt/QWZ1pjXXX 2ZdNkxsH84BuQ1QQWVpY0QPHI50TqPcwfT/kXyWmNRVOsIXFarJOzwVlvZXxQsFfZPWS 6shXDnBh2ghrOBiVVwVQKtnfnasdkK4rld3KaU3y8KRKVGzSf9XfpqWGj25+2jS5UGin LQBw== X-Gm-Message-State: APjAAAULiwyC1jrA5VTYTd/bH8sbPVcsUnniPIlMsuYDuGy9bRFTTNUp qn09lXmThBLuDhSGFaenaU5O2JzKTDyQRQ== X-Received: by 2002:a02:ca42:: with SMTP id i2mr10497732jal.87.1575582768972; Thu, 05 Dec 2019 13:52:48 -0800 (PST) Received: from localhost.localdomain (c-24-9-77-57.hsd1.co.comcast.net. [24.9.77.57]) by smtp.googlemail.com with ESMTPSA id n22sm740184iog.14.2019.12.05.13.52.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2019 13:52:48 -0800 (PST) From: Jim Cromie To: jbaron@akamai.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: linux@rasmusvillemoes.dk, Jim Cromie , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH 18/18] dyndbg-docs: normalize comments in examples Date: Thu, 5 Dec 2019 14:51:51 -0700 Message-Id: <20191205215151.421926-21-jim.cromie@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191205215151.421926-1-jim.cromie@gmail.com> References: <20191205215151.421926-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org given that: ~# cat batch-of-dyndbg-cmd-queries > /sys/kernel/debug/dyndbg/control works, and since '#' is a legal comment character accepted by >control, the syntax is much more like bash than c++. So replace '//' with '#'. Someone might copy-paste these examples, lets make them more usable Signed-off-by: Jim Cromie --- .../admin-guide/dynamic-debug-howto.rst | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/Documentation/admin-guide/dynamic-debug-howto.rst b/Documentation/admin-guide/dynamic-debug-howto.rst index d91dbb52721d..33eed4713bb8 100644 --- a/Documentation/admin-guide/dynamic-debug-howto.rst +++ b/Documentation/admin-guide/dynamic-debug-howto.rst @@ -189,11 +189,11 @@ format characters (``"``) or single quote characters (``'``). Examples:: - format svcrdma: // many of the NFS/RDMA server pr_debugs - format readahead // some pr_debugs in the readahead cache - format nfsd:\040SETATTR // one way to match a format with whitespace - format "nfsd: SETATTR" // a neater way to match a format with whitespace - format 'nfsd: SETATTR' // yet another way to match a format with whitespace + format svcrdma: # many of the NFS/RDMA server pr_debugs + format readahead # some pr_debugs in the readahead cache + format nfsd:\040SETATTR # one way to match a format with whitespace + format "nfsd: SETATTR" # a neater way to match a format with whitespace + format 'nfsd: SETATTR' # yet another way to match a format with whitespace line The given line number or range of line numbers is compared @@ -204,10 +204,10 @@ line the first line in the file, an empty last line number means the last line number in the file. Examples:: - line 1603 // exactly line 1603 - line 1600-1605 // the six lines from line 1600 to line 1605 - line -1605 // the 1605 lines from line 1 to line 1605 - line 1600- // all lines from line 1600 to the end of the file + line 1603 # exactly line 1603 + line 1600-1605 # the six lines from line 1600 to line 1605 + line -1605 # the 1605 lines from line 1 to line 1605 + line 1600- # all lines from line 1600 to the end of the file Flags Specification:: @@ -345,44 +345,47 @@ Examples :: - // enable the message at line 1603 of file svcsock.c + # enable the message at line 1603 of file svcsock.c nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > /dyndbg/control - // enable all the messages in file svcsock.c + # enable all the messages in file svcsock.c nullarbor:~ # echo -n 'file svcsock.c +p' > /dyndbg/control - // enable all the messages in the NFS server module + # enable all the messages in the NFS server module nullarbor:~ # echo -n 'module nfsd +p' > /dyndbg/control - // enable all 12 messages in the function svc_process() + # enable all 12 messages in the function svc_process() nullarbor:~ # echo -n 'func svc_process +p' > /dyndbg/control - // disable all 12 messages in the function svc_process() + # disable all 12 messages in the function svc_process() nullarbor:~ # echo -n 'func svc_process -p' > /dyndbg/control - // enable messages for NFS calls READ, READLINK, READDIR and READDIR+. + # enable messages for NFS calls READ, READLINK, READDIR and READDIR+. nullarbor:~ # echo -n 'format "nfsd: READ" +p' > /dyndbg/control - // enable messages in files of which the paths include string "usb" + # enable messages in files of which the paths include string "usb" nullarbor:~ # echo -n '*usb* +p' > /dyndbg/control - // enable all messages + # enable all messages nullarbor:~ # echo -n '+p' > /dyndbg/control - // add module, function to all enabled messages + # add module, function to all enabled messages nullarbor:~ # echo -n '+mf' > /dyndbg/control - // boot-args example, with newlines and comments for readability - Kernel command line: ... - // see whats going on in dyndbg=value processing + # boot-args example, with newlines and comments for readability + # Kernel command line: ... + + # see whats going on in dyndbg=value processing dyndbg.verbose=1 - // enable pr_debugs in 2 builtins, #cmt is stripped + + # enable pr_debugs in 2 builtins, #cmt is stripped dyndbg="module params +p #cmt ; module sys +p" - // enable pr_debugs in 2 functions in a module loaded later - pc87360.dyndbg="func pc87360_init_device +p; func pc87360_find +p" + + # enable pr_debugs in 2 functions in a module loaded later + pc87360.dyndbg="func *_init_device +p; func *_find +p" -- 2.23.0