Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3943433rdg; Wed, 18 Oct 2023 10:08:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFtX283356EK2ZOcijoKFZF/3PHK1yVqjC14WfAZPnid/+ue32efd8G90c094V26fBl3lvH X-Received: by 2002:a17:90a:1141:b0:27d:61ff:3d3b with SMTP id d1-20020a17090a114100b0027d61ff3d3bmr6189686pje.38.1697648886904; Wed, 18 Oct 2023 10:08:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697648886; cv=none; d=google.com; s=arc-20160816; b=iOwImktHDuBj7/UJT6jFi62fwEL5z8MQl0i0iJDlhnv2tupV0s6g/IYo17UrleIXPp UqJDyNc34ut0p7hNOhkj+Yqq+EZZSt7uLS2Ig8aL5hv1Vm9c8eKO+joh0UhQAoEHf5mP iUv5ieBoQe2lCulvlJUd/8aRSXbxY902735zubnx1yKzyGMa5EIjZUYP5EFGD43JIpLG CpcqyqN7MFvjbNoM/MNIZc8jyk5mGhDcYlR82dByuHvYKgDiPITeUlHau7BLZy9cuTVF psTz+mxlueQ9AIQbUy4c0nGg1e1vk6TkxLBYNKqkOV5ICN+h0Q7AdVsOHVnzARUH6hGV uBTA== 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=m2Hn5pT28/jZmYZLDxW0t8SHXvPdNDH+Olrk3yFtzgY=; fh=dD4hpA3+YqlszWEwFTO+ADczjyhU7P27niWnWgZXhCU=; b=Nna0pYSgWcQP5m37c1HrY5Yf1df2cjhjwUzZL+xsHYbxtzaAx67OogqDoYYoBA/yws xLLJIvCUWx08CPv9VzyUbdHaI8P/BLagiEwTehb9J9uG39qupkDc5fLI8QZ7mSyDuCKZ YAl6xyWPEZtughjXXDV6H7VNVuLUJjCRy+gg41X+lU1MAZr8wjr0jd6K6wJIWsJWyf9E hJvMzt2FsvruFmyXulDGtSE463nqRgxVFzFW3kpC0SlMIZrfXIhL4HSq1PGGu+a/4kjs TOQnKbqcw5DEz0T81giwZAVAlwc9wWcbkeLljevAfDPSQlwPFtvLhka8QTrLdmMz4FrI d1ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Hc0E47Hf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id d4-20020a17090ad98400b0027766994586si270665pjv.71.2023.10.18.10.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 10:08:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Hc0E47Hf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 6F6968038D8B; Wed, 18 Oct 2023 10:07:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231835AbjJRRGo (ORCPT + 99 others); Wed, 18 Oct 2023 13:06:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231341AbjJRRGa (ORCPT ); Wed, 18 Oct 2023 13:06:30 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DCDC125; Wed, 18 Oct 2023 10:06:20 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id ca18e2360f4ac-7a667f3f5c0so47684439f.0; Wed, 18 Oct 2023 10:06:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697648779; x=1698253579; 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=m2Hn5pT28/jZmYZLDxW0t8SHXvPdNDH+Olrk3yFtzgY=; b=Hc0E47HfkOZ0tmojVIdJ0hQMC89qOXgziWLbY5VnpxMy8VstdIhgBvq2t28yP7P6mR SwclSd5q1Wx+gApFkJ58nCwaVFAaHos1wWLwGa82UBNou4qY3GWAgrlP6uvSMVmfFcPr GYL2DXCY47CrayUtScnXnhr6cKVtnJA+/CUXT99y3Z0phw0y4vFLazgP2VQ3C6Q8T9eH 6DTyEKgvyDb3WhWElucehto4Gu1Gm4E4fBrB/0VxDbtbf+4mfhL8ZQ1AhOPp7QQsriiX zFb/ALgQNJxQXymsIUF4Z8+K44fW1wzfdS02CPnvJ4sXv7VXfbY4Yb49DMp3mLEQdBS5 AuiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697648779; x=1698253579; 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=m2Hn5pT28/jZmYZLDxW0t8SHXvPdNDH+Olrk3yFtzgY=; b=WrAPQEDCVFMuMvXacne8zuChQJGXOu4N+K9HjIeMxkOHVkWLinSpYilOu2p0DXn0U7 lA3b+pDx8g1pgUwyoJBwdA1+Hc3vyxWNlkORUYs7xWeXfX4kXjRYVxL4QFAHZEH9IL16 LictCJSrxqMFqF6eplYXALjq7dUti6yJ/1HUojHXnVCJ0BH8fEpqZinl6jREcY1TFCO3 CpHJTyGHKls/qRjDt2EpyDu8QcxjycTeFDjnPHAMjaEdPfwXr0B7oq6VBEqHVMA9th6l i8mc+q1JoPolBwtVFPI5j4rfsCpAuzsAt84lzAdAna58dcgKNUEuxgqIdWRAy4mCsaxP uP9Q== X-Gm-Message-State: AOJu0YxjedobcWThuB8kSICQoOkRiBn8ELzWHqaUKfTHJ/vnlr7ALUWR Dp9pDimnWGVsHBvc9Hed0cUGegMZqu6+mw== X-Received: by 2002:a05:6602:14d2:b0:79a:b526:2f1c with SMTP id b18-20020a05660214d200b0079ab5262f1cmr5966447iow.21.1697648779169; Wed, 18 Oct 2023 10:06:19 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id n4-20020a5d8244000000b0079fa1a7cd36sm1228944ioo.30.2023.10.18.10.06.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 10:06:18 -0700 (PDT) From: Jim Cromie To: linux-kernel@vger.kernel.org, jbaron@akamai.com, gregkh@linuxfoundation.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: lb@semihalf.com, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, daniel.vetter@ffwll.ch, jani.nikula@intel.com, ville.syrjala@linux.intel.com, seanpaul@chromium.org, robdclark@gmail.com, groeck@google.com, yanivt@google.com, bleung@google.com, rostedt@goodmis.org, linux-doc@vger.kernel.org, Jim Cromie Subject: [PATCH v7c 08/24] dyndbg: reduce verbose/debug clutter Date: Wed, 18 Oct 2023 11:05:48 -0600 Message-ID: <20231018170604.569042-9-jim.cromie@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231018170604.569042-1-jim.cromie@gmail.com> References: <20231018170604.569042-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 groat.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 (groat.vger.email [0.0.0.0]); Wed, 18 Oct 2023 10:07:37 -0700 (PDT) currently, for verbose=3, these are logged (blank lines for clarity): dyndbg: query 0: "class DRM_UT_CORE +p" mod:* dyndbg: split into words: "class" "DRM_UT_CORE" "+p" dyndbg: op='+' dyndbg: flags=0x1 dyndbg: *flagsp=0x1 *maskp=0xffffffff dyndbg: parsed: func="" file="" module="" format="" lineno=0-0 class=... dyndbg: no matches for query dyndbg: no-match: func="" file="" module="" format="" lineno=0-0 class=... dyndbg: processed 1 queries, with 0 matches, 0 errs That is excessive, so this patch: - shrinks 3 lines of 2nd stanza to single line - drops 1st 2 lines of 3rd stanza 3rd is like 1st, with result, not procedure. 2nd is just status, retold in 4th, with more info. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index b67c9b137447..b0e11f6bfaa2 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -266,9 +266,6 @@ static int ddebug_change(const struct ddebug_query *query, } mutex_unlock(&ddebug_lock); - if (!nfound && verbose) - pr_info("no matches for query\n"); - return nfound; } @@ -497,7 +494,6 @@ static int ddebug_parse_flags(const char *str, struct flag_settings *modifiers) pr_err("bad flag-op %c, at start of %s\n", *str, str); return -EINVAL; } - v3pr_info("op='%c'\n", op); for (; *str ; ++str) { for (i = ARRAY_SIZE(opt_array) - 1; i >= 0; i--) { @@ -511,7 +507,6 @@ static int ddebug_parse_flags(const char *str, struct flag_settings *modifiers) return -EINVAL; } } - v3pr_info("flags=0x%x\n", modifiers->flags); /* calculate final flags, mask based upon op */ switch (op) { @@ -527,7 +522,7 @@ static int ddebug_parse_flags(const char *str, struct flag_settings *modifiers) modifiers->flags = 0; break; } - v3pr_info("*flagsp=0x%x *maskp=0x%x\n", modifiers->flags, modifiers->mask); + v3pr_info("op='%c' flags=0x%x maskp=0x%x\n", op, modifiers->flags, modifiers->mask); return 0; } @@ -537,7 +532,7 @@ static int ddebug_exec_query(char *query_string, const char *modname) struct flag_settings modifiers = {}; struct ddebug_query query = {}; #define MAXWORDS 9 - int nwords, nfound; + int nwords; char *words[MAXWORDS]; nwords = ddebug_tokenize(query_string, words, MAXWORDS); @@ -555,10 +550,7 @@ static int ddebug_exec_query(char *query_string, const char *modname) return -EINVAL; } /* actually go and implement the change */ - nfound = ddebug_change(&query, &modifiers); - vpr_info_dq(&query, nfound ? "applied" : "no-match"); - - return nfound; + return ddebug_change(&query, &modifiers); } /* handle multiple queries in query string, continue on error, return -- 2.41.0