From patchwork Wed Oct 18 17:05:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Cromie X-Patchwork-Id: 13427494 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 60FB8CDB47E for ; Wed, 18 Oct 2023 17:06:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA54410E427; Wed, 18 Oct 2023 17:06:25 +0000 (UTC) Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0482610E415; Wed, 18 Oct 2023 17:06:20 +0000 (UTC) Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-7a667f3f5c0so47684239f.0; Wed, 18 Oct 2023 10:06:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697648779; x=1698253579; darn=lists.freedesktop.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=i3fOldKHmYydg7S3c4w7z+PANDmZstTFNxy5P9q+Kyrzyf3kITB1MqiIOQIZsBL+2h nOp5rMHkFK/+234Z2TTPOKhenducGruzAbzMAEB7QkdZEPsUoNUeTf8vmS4CnmRwVWUD adxXETbkc2EXFOcW82/tftEyw9n0ZdVRcQw5wCfQz1nqfjHYc+Xw4mumIECbDcL1dmx8 FQJhwfH1mlKAkAQdpQjdYeB/4nNH7AsN9e8i/rGz1JIHRSaiwcW2c2Z3BwPH3ALDxwpr dHbGSdAnhaAr2ekmu5XTkMrpIG956fb0fj7K4T3a+46ATAlvdUaY7v7Wgrs2Jfn0w1YE YOrw== 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=PpsOt9aDH6FJiQ176BXED7iXKiNwyI7hOhbG38ELqbZ0H3O/ynjMNgh3QLsIYpcb7C X4Pt3YuNbSkI/45CAPjsQvyNHpTxZz+W5nw37ivXl02fdEl6lCE5tpGSs3aPb7dBVL8e Nxc3eXb0j0dSzEuoOu+Ae3Ugru3FWkiy/JR/+4RMnw5Mi4wLx5h37SqI1njSUvKLxwtR g9CpeuHHEs67NxrGk+rQsvJlMH4uIiuRSpleacyN+E6EwS2m9fsixiCycChctBzMnrX+ s/0Dr5znUrjpp9X+wGIVwMjX2U7ySzLBFKcqopLkhM/Nw3RIfMT2cc5bxHkBPKpIoxr2 Savw== X-Gm-Message-State: AOJu0Yz7qhvVUY62j5U0bATTz4wvHH7XQ8sB5VkxSsiJF7JXZBKmOmUB AvdvmRe2t0VbiT2zikv8e+c= X-Google-Smtp-Source: AGHT+IEfAQ3kI/4NJHJoNXKLByRgUtsbIY/Sel5Vih/Qo78MwljU46hSh5unyYb0Pz3Qfe3ouoQAnw== 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 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 Subject: [Intel-gfx] [PATCH v7c 08/24] dyndbg: reduce verbose/debug clutter X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lb@semihalf.com, groeck@google.com, linux-doc@vger.kernel.org, jani.nikula@intel.com, daniel.vetter@ffwll.ch, linux@rasmusvillemoes.dk, rostedt@goodmis.org, Jim Cromie , mcgrof@kernel.org, seanpaul@chromium.org, joe@perches.com, bleung@google.com, yanivt@google.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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