From patchwork Thu Jul 13 16:36:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Cromie X-Patchwork-Id: 120019 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1949533vqm; Thu, 13 Jul 2023 09:41:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlGCbPcozVsZ6DzeTFW6UFedc/LkV6cvaJUNZf+vg9fB6fmL3c3SOH1eW0RJKqZfqPswzEw5 X-Received: by 2002:a17:906:9b90:b0:96f:e5af:ac5f with SMTP id dd16-20020a1709069b9000b0096fe5afac5fmr2318316ejc.47.1689266518557; Thu, 13 Jul 2023 09:41:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689266518; cv=none; d=google.com; s=arc-20160816; b=aTpdHAWfN0mZ003UpmuUVJ9kfQzXdM62moDYyqbad6zJOVFdq5dtUvlq1J4cpVZr9X 22FfIiyHQYc3dk0jZ4VJbP4OmgEf9iGz8Lqu6n3Nuz5p5HqA7z+4d9v+kAt8gRd/f1/3 mIfr0ropWMH3XFogxmGleIJa3JoZ7rNPYVLQ6CBSQXYqVkP9zGJjX9oUf3mFee6sLgw7 MAxNqrCZGyCw1OsDObCGXycf5meSpjLubzecI5TEFsNOGZYrd8KsFoTzriNYakfcJjXP iWO84GjOE5UULjChNtRPJFu+PmcBjrTZrB4Iq4Qncy1gDYwMnk1aK1+yf81AgUcN7JJF LK/w== 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=FH1hoS5TyoLcmhyYV0xYU1iuMulIPyQc9Z8crXbpYkA=; fh=/CYHsJHkAPOgOy4IDXYU5w+VojxE3561vOD18ijZg9Q=; b=ROsqQK3XpJf2VJqx7cAb/JlBAuXdks0ffgi9BEctixbwHHkX9ocPQDXBkF+X83Aqff Q/uHgifjtZS/0yo//GzECB8TirKg9fU8AoAQKcmSQjEK07y3fIA4y00PbvxjUoXNt6xv +TdPShOVVrdFlECUnM/jsrBy+prgoet+ZdokK/qzI9HbiuGOK0RblSyNHPja185naa3D a6pe3xaivke90laYTJnihVfPlUewUJfdo7fzsZvkHnz+nVmPVhB2a9b6NAmLRpn5IrEL wyn/4meu5a4HEXjV6vgE5ZwqcZl6d96tgvdyYosuv2+gR9b2gsdxhcU98iRafT6a65Fo 7v3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=dZjKH4hn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rn8-20020a170906d92800b0099319803901si6590971ejb.844.2023.07.13.09.41.33; Thu, 13 Jul 2023 09:41:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=dZjKH4hn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234998AbjGMQii (ORCPT + 99 others); Thu, 13 Jul 2023 12:38:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234846AbjGMQhX (ORCPT ); Thu, 13 Jul 2023 12:37:23 -0400 Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43237273E for ; Thu, 13 Jul 2023 09:37:02 -0700 (PDT) Received: by mail-il1-x135.google.com with SMTP id e9e14a558f8ab-345d3c10bdfso3965105ab.2 for ; Thu, 13 Jul 2023 09:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689266221; x=1691858221; 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=FH1hoS5TyoLcmhyYV0xYU1iuMulIPyQc9Z8crXbpYkA=; b=dZjKH4hnSpuZ3DTO53o8QKHq0NPNvgYYxlgFp+7pfxVeTTVJHEVyQ+GHQf1R2RPDaG dfhJXbMmM9lCQBqsbp+aZqUw4vI54B6tqh7xWJsWp5O+MP1w+ng43Y7IhhTmUj2vFYcb Zg2qdshNds5TRWuzHH4Xbe8bq//a2I+qyIjgPTCZIH3CBqFoog97LPA90mgd0eQ7ASyR VgIBqaaFrBIFK7Lcg4rEoDOwxLSBP/tdYc2QAnNSfpCSAFt4ozhZPsoD1JrcQgCP+jEI OfotqOaBQOSUkrlOLm1b+x/cQI0TxB7x+dsBsQ3sR76vievwTLn9ayR4KOLj8WFRJ4gu yJWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689266221; x=1691858221; 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=FH1hoS5TyoLcmhyYV0xYU1iuMulIPyQc9Z8crXbpYkA=; b=kDc9M4nmcqpM4jkT5h+O/PvZjsuOaRVwSExp19lvBk+FKXuBozo2E1GmIzJTpIqHCa qy3Qmsufepq/9doOCmJAje7vtsvs8f8IF6vWIccCWWWFB4sfKfG9guTDAoWxlrsVQweU eZeAr1PpuL2Id7TySQIQ64vtbyp5MAaMl4Capxp/FIun6J0msI/+V5S1T+r4XXbWOHbl 7XwO7VVLMFgdEBp6cDCuj8mEu25O/kth+BDedqQePFUyP1NZjnDIsBGGywT9Zrf8YX9/ /5bkB38JVnNGRFKkI23ccLe4GUHyEcDx3Z/YmJtWCwUjzrlEUV1mQp9+Mo901OTHac4t DgWQ== X-Gm-Message-State: ABy/qLYqCwTySEavVq0qaoNqILZAHfzqb3sReZKf0T5tGvuJHqYGnZrU R0U8B77GHFqNjdWzWsiNmaQ= X-Received: by 2002:a92:c803:0:b0:346:59a1:ce35 with SMTP id v3-20020a92c803000000b0034659a1ce35mr2334271iln.6.1689266221643; Thu, 13 Jul 2023 09:37:01 -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 s7-20020a92d907000000b00345950d7e94sm2147571iln.20.2023.07.13.09.37.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jul 2023 09:37:01 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, daniel.vetter@ffwll.ch, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: jani.nikula@intel.com, ville.syrjala@linux.intel.com, seanpaul@chromium.org, robdclark@gmail.com, gregkh@linuxfoundation.org, Jim Cromie Subject: [PATCH v4 16/21] dyndbg-test: make it build with just CONFIG_DYNAMIC_DEBUG_CORE Date: Thu, 13 Jul 2023 10:36:21 -0600 Message-ID: <20230713163626.31338-17-jim.cromie@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230713163626.31338-1-jim.cromie@gmail.com> References: <20230713163626.31338-1-jim.cromie@gmail.com> MIME-Version: 1.0 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_NONE,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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771324329012186598 X-GMAIL-MSGID: 1771324329012186598 To make the 2 test modules buildable with CONFIG_DYNAMIC_DEBUG_CORE, add CFLAGS_$ofile defns to supply -DDYNAMIC_DEBUG_MODULE to cc. And change the Kconfig entry to allow building with just _CORE. Signed-off-by: Jim Cromie --- lib/Kconfig.debug | 10 +++++----- lib/Makefile | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index ce51d4dc6803..d4fbbcc395d2 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2695,12 +2695,12 @@ config TEST_STATIC_KEYS If unsure, say N. config TEST_DYNAMIC_DEBUG - tristate "Test DYNAMIC_DEBUG" - depends on DYNAMIC_DEBUG + tristate "Build test-dynamic-debug module" + depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE help - This module registers a tracer callback to count enabled - pr_debugs in a 'do_debugging' function, then alters their - enablements, calls the function, and compares counts. + This module works/demo's the dyndbg's classmap API, by + creating 2 classes: a DISJOINT classmap (like DRM.debug) + and a LEVELS/VERBOSE classmap (where 2>1). If unsure, say N. diff --git a/lib/Makefile b/lib/Makefile index f36048371dd2..8411015a57c1 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -233,6 +233,8 @@ obj-$(CONFIG_HAVE_ARCH_TRACEHOOK) += syscall.o obj-$(CONFIG_DYNAMIC_DEBUG_CORE) += dynamic_debug.o #ensure exported functions have prototypes CFLAGS_dynamic_debug.o := -DDYNAMIC_DEBUG_MODULE +CFLAGS_test_dynamic_debug.o := -DDYNAMIC_DEBUG_MODULE +CFLAGS_test_dynamic_debug_submod.o := -DDYNAMIC_DEBUG_MODULE obj-$(CONFIG_SYMBOLIC_ERRNAME) += errname.o