Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2023407rdb; Thu, 7 Dec 2023 16:17:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCN2fXw5KEIDiB0Ix/o48KicUQL5Z9Jq1hyRjsnyZE+CZxkO7ApqqdaFVQDo+pjH32ruw3 X-Received: by 2002:a17:903:40c5:b0:1cf:b4bb:9bdc with SMTP id t5-20020a17090340c500b001cfb4bb9bdcmr101887pld.9.1701994635402; Thu, 07 Dec 2023 16:17:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701994635; cv=none; d=google.com; s=arc-20160816; b=RNS2uDhu0v8ueTTenrQeedZly2Cy6rw/TJl17Vu1l/RvZv3uFZi5kDcINRz1r6/7tB ZSKcBalU6kTyvdaxz2qW2f3MGkz4p3oxz8V0XgCzt1hYYabkTERFl/l+V+yqBuVF378M D59M1MlYoabStOOzJvfyC+GPrBwyW0Vrqi1VqAoAQb7kTdJD39I7AIlz1RzZgjL+woXz nLDuiXORCaiV9guZyszBMP1dQC+gZsFE1UhGaWF1ncinf8QgC7Un0ehUOJlH8Rs3nBg/ 8yWIdla0pPb1JVbUGkhKnnMMR2FIwHaElqTw5bjOqMawGqfANTQWHFjwyVOJTAfZUI7K lgCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nzemyBWiktEMRpqERnIwUz6Pik0FVBTgB713Rxzb6zY=; fh=Zewmf3wThiipMhDjR96yol5QxF5bGjQ0muN6YDM9mM0=; b=p8eqeKtO6kr5PtnNFQ5RjheM4n1quUs0ovYAOk7DVqew1/N3Qab1gdA1RWdjt6YUEG J7VpwcEI2++6wWuDPR0osNFytXYAh1wElIIseCOMrvdOOCUqH83ir9iL6Mp6z/HNrpht VmhFr4MIS6w6dRw5PeQTK9hg88JbS/hoi7P9LAmQqU0kTpQGImqnDj7hiMUQKn8POQzw h0b3f34/qjSJvu/MngqCN6r3SV/7O2M3QjMU1PyNW1h6T301eHORVkgfSQr6Br0Ykz8L 8IqahaybhdeqDFfa+0lQPreP7SttOR1ynaK0eUw8YhxvhmbT2OL9SgSzO44D/QZAeayv G5oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="eYB2/Nv2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id m10-20020a170902db0a00b001d0a57bb52csi558102plx.480.2023.12.07.16.17.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 16:17:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="eYB2/Nv2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id C01D280658DD; Thu, 7 Dec 2023 16:15:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444220AbjLHAPm (ORCPT + 99 others); Thu, 7 Dec 2023 19:15:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444156AbjLHAP1 (ORCPT ); Thu, 7 Dec 2023 19:15:27 -0500 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F4A71725 for ; Thu, 7 Dec 2023 16:15:33 -0800 (PST) Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-7b3ec83a8d4so65778839f.1 for ; Thu, 07 Dec 2023 16:15:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701994532; x=1702599332; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nzemyBWiktEMRpqERnIwUz6Pik0FVBTgB713Rxzb6zY=; b=eYB2/Nv2F6Rz8yVggy3H5m3aBU+QdvcME2mv0cZEKardO8zz54KspNspZFHjVX1B7b xMMrbX3zTyw2pbsV66XNCUQF3z+OKm+O5ipsBsXBXCiQoGNbPAomG8bdKpK0xfnpKedl zZB7JqO8po9m8lythDVGulp3sujuQM26KjcNZwG02NV3UqFWzR13NwnHB41N2at+zCVY m/v6FJdWXYZv5q7ZxHhRzh2F3W3ATWJjFdg7kgwZAbPEMu50kjLXMPVtGuJ9jcpgGNsp SH5r1c+NVBUrad1G1Tcp8ACmwUROeuWhyX6vxdLNoe7RNmkIwfMSbVM/4v84Tkm5yV/i ZaQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701994532; x=1702599332; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nzemyBWiktEMRpqERnIwUz6Pik0FVBTgB713Rxzb6zY=; b=vtmayaK9Snl3Z6ZlD6mgW6TT7aVfPXwTH4x6RttxC4TMjPZh9rwH1QzKxnqeHV9uyq MrYaRn3dQdIOlCnDZyb28oaSHInNQ/gJ/BnVjKdMeQFkdZqn6hAS5EjZ0790pBzq4ZuV My77epjp20wcyR3OMuKnbYAyG6L2bGRYFjuiybY91mUCgVC/tr1dzWd76gQSHzWELfSf MjwxNWn9K4fxdzN82CAd3RJHcwsyy4fay4FD0USK4em6+U7awRXlwCJY8hfmcLsM0sCE 2S2qxVuUcZtm9roFFeb4OZUDYLStJPMosZ2o4sS1DPQbm7b36+aytwkEckOMiHKSBQra ZXRA== X-Gm-Message-State: AOJu0Yw2goeiS6dRBCvAOLcp10x95A2bB47N7e+0Bfq7PY7uhXQh85B3 +HoTaAm1oZqLOb1yS0a1Bsc= X-Received: by 2002:a6b:fe05:0:b0:7b7:22d:6ee3 with SMTP id x5-20020a6bfe05000000b007b7022d6ee3mr44376ioh.18.1701994532447; Thu, 07 Dec 2023 16:15:32 -0800 (PST) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id z18-20020a056638241200b004664a0a7f2csm184652jat.177.2023.12.07.16.15.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 16:15:32 -0800 (PST) From: Jim Cromie To: lb@semihalf.com, linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org, bleung@google.com, contact@emersion.fr, daniel@ffwll.ch, dianders@chromium.org, groeck@google.com, jbaron@akamai.com, jim.cromie@gmail.com, john.ogness@linutronix.de, keescook@chromium.org, pmladek@suse.com, ppaalanen@gmail.com, rostedt@goodmis.org, seanpaul@chromium.org, sergey.senozhatsky@gmail.com, upstream@semihalf.com, vincent.whitchurch@axis.com, yanivt@google.com, gregkh@linuxfoundation.org Subject: [re: PATCH v2 00/15 - 08/11] dyndbg: split multi-query strings with % Date: Thu, 7 Dec 2023 17:15:11 -0700 Message-ID: <5351f56289add68eee2aa5288f82a313c2b9f664.1701993656.git.jim.cromie@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 07 Dec 2023 16:15:57 -0800 (PST) Multi-query strings have long allowed: modprobe drm dyndbg="class DRM_UT_CORE +p; class DRM_UT_KMS +p" modprobe drm dyndbg=< on module: <*> [ 38.172011] dyndbg: bad flag-op f, at start of format [ 38.172487] dyndbg: flags parse failed [ 38.172839] dyndbg: query 1: on module: <*> [ 38.173285] dyndbg: expecting pairs of match-spec [ 38.173791] dyndbg: query parse failed [ 38.174141] dyndbg: processed 2 queries, with 0 matches, 2 errs bash: echo: write error: Invalid argument In trade for that minor format selection limitation, we get to do: vng -v --user root -p 4 \ -a dynamic_debug.verbose=3 \ -a drm.debug=0x15 \ -a i915.dyndbg=class,DRM_UT_CORE,+pfmlt_%class,DRM_UT_KMS,+pfml modprobe drm modprobe i915 NOTES/TLDR: In this example, using both drm.debug & drm.dyndbg is mostly for testing. Using drm.debug is preferred, because the drivers all explicitly depend on that input/control-point, so settings there are propagated to drivers. But more to the point, drm.dyndbg explicitly limits the query to drm. In fact, you could pass a module wildcard in the above, and achieve the same thing: vng -v --user root -p 4 \ -a dynamic_debug.verbose=3 \ -a \*.dyndbg=class,DRM_UT_CORE,+pfmlt_%class,DRM_UT_KMS,+pfm%class,DRM_UT_ATOMIC,+pf ':' would be a more natural multi-cmd separator, but is reserved for +T: to designate separate tracebuf instances. If '%' is distasteful, the backup plan is ",_,", since that would never appear in a useful cmd. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index c974f6e19ca1..0ca3ba9e2032 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -963,7 +963,7 @@ static int ddebug_exec_queries(char *query, const char *modname) int i, errs = 0, exitcode = 0, rc, nfound = 0; for (i = 0; query; query = split) { - split = strpbrk(query, ";\n"); + split = strpbrk(query, "%;\n"); if (split) *split++ = '\0'; -- 2.43.0