Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1465159ybt; Sat, 20 Jun 2020 11:10:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXrUigP2xiUVOVAXUv8bZUIlleQUoUhO4tIO8/Jty7UFRnG73/4mIuE6FGr+brafE0LeyD X-Received: by 2002:a17:906:fac8:: with SMTP id lu8mr8682025ejb.432.1592676610145; Sat, 20 Jun 2020 11:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592676610; cv=none; d=google.com; s=arc-20160816; b=ryz3gcSjOToxrvw2PXlCorWTLHMiMQU6liAbO+2v5potBXnoVabsI9/a/v8Bn/IBBZ SxYEEXUqbSEG2CjW5iy5LBI3UPkBwiSpRMsBCHAkH9Lbxqsri/xLD1LufIzgCunyfSW0 IWthZXOspY7C0XIu6qJU2DgReKqQq9HjERnbF89G7lnnt7EMc++TRUpTRjRTShue9LQg UFvtAp8qWrYk0ka5oraLImg941OoWKoHb4czBcALhxtawGNBZ0lRNoRDxOx6WVcvltBU IIyui8MwFuSnPnOHGieR2TyEWDTiVnTwkwjeND1Qo04M1FdfBK7DvTXkszFFbkcxURWb 6lxw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=106X0Poqk7rNJqRZ54Uc7g11zNpMmlc8Bg2KXXYOEE4=; b=MawyJ87aeDjgS873mPO7/NxM0fGFSwbroj7W3yUNMzrvMl6L3A4ghq3Ux0HLZWIj3q YDvJok78Qj/HRPnVqYc3G5czdTaEWbRcIrKvmZ+JDsLhIueNjpnRA+iW6b7B+EoVymRg DkbSR/upKKR9BLSZEAZmOyl8EZdSMsAnRULBUcTypWI0CcBTJbyPoaoxadWHBVtG1w+B 5FFGFzIL3KloHKfFE5KCNXui9lI0SvZu45mFFENeEdZUHkzkTPWDWO8WbayA6MqsCzwB xHqSewop1Wyh5e/ggBp/7xQj14dDSG3Ho37CD38kuWd830vHl+QAlPBiVBthNlHCeVqk URWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=F3qZyWxp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id y16si6275344edw.311.2020.06.20.11.09.47; Sat, 20 Jun 2020 11:10:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=F3qZyWxp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728399AbgFTSH5 (ORCPT + 99 others); Sat, 20 Jun 2020 14:07:57 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:42994 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727808AbgFTSH4 (ORCPT ); Sat, 20 Jun 2020 14:07:56 -0400 Received: by mail-ot1-f65.google.com with SMTP id t6so9826818otk.9 for ; Sat, 20 Jun 2020 11:07:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=106X0Poqk7rNJqRZ54Uc7g11zNpMmlc8Bg2KXXYOEE4=; b=F3qZyWxpTkVVO+7K0IF8LlX8LNQx8FS/y3k1+QgnAbO0hAfM0DTat0Pn+Q2lPAmbWp yTQxy35uK74Odgf/VEM8+D9uJ4oMYRCc0OrXksDOVfM2bGKZLgTzJVF4L7oB86tn7Mmv ITm2N3GvRGA6splzYp/3oKA3llIeo2ZZ0iEyd3Ik/ld4FPFNJaKedVaEdCoVVwEzbpr2 BOBzinpo0rPGt4iZMoZDkNVVVzf9HGx3g/5j9bm17rDdiuNT+W+2W6I9KmQbX7D3VqNC MV/rDQv1rORQRXPBw5HboUnbHCwXT0X6I1A0SDgCeoLYUBhO5N+FwbUygfahAhZJN9pD t4gQ== 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:mime-version :content-transfer-encoding; bh=106X0Poqk7rNJqRZ54Uc7g11zNpMmlc8Bg2KXXYOEE4=; b=Dlb19iy06wHABCFkL5Ys7R6i8+kaQmo3plQWAtx3PPvqOyKVzwj8wiFswyFbEMgWjk /BxlnY/ZzY16fGvat1Up328VnQBe9jqzjcWFokCC+HcFj/7jn3mHN7+Q/FMilw83hGEQ hlHcVSvfg1B47XVBvkeDMyuWR3AIjhYNnsp/ByTjPoEJlRacDuBgaGskJfdcTco+Whjo aY2PJlYfiwVA34pJs3DOjcIRTxjld06uvb6XdD20jeg+M8Lyjx4IRh/QqnI/NI4HmjIA kPUPjKgv8ZneYPLnvMJ/7XACmqR5fNJuzNaj3IaUNs/H2gKK9lUZpXZloCUvFKRMDzct Kq6w== X-Gm-Message-State: AOAM5306EtZN8M9baUX0NCnP++B+dJBWiDrTtE3OSaRynpf3obtFpZMY OKHJb8YhUZqybxFvfCvth6I= X-Received: by 2002:a9d:1727:: with SMTP id i39mr7636838ota.367.1592676415839; Sat, 20 Jun 2020 11:06:55 -0700 (PDT) Received: from localhost.localdomain (c-24-9-77-57.hsd1.co.comcast.net. [24.9.77.57]) by smtp.googlemail.com with ESMTPSA id y31sm2077901otb.41.2020.06.20.11.06.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jun 2020 11:06:55 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, linux-kernel@vger.kernel.org, akpm@linuxfoundation.org, gregkh@linuxfoundation.org Cc: linux@rasmusvillemoes.dk, Jim Cromie Subject: [PATCH v4 00/17] dynamic_debug cleanups, query features, export Date: Sat, 20 Jun 2020 12:06:26 -0600 Message-Id: <20200620180643.887546-1-jim.cromie@gmail.com> X-Mailer: git-send-email 2.26.2 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 this is v4, changes from previous: - dropped flags extensions, one internal optimization kept - export ddebug_exec_queries() - done previously, but warrants attention - add ^anchor to format matching v3: https://lore.kernel.org/lkml/20200617162536.611386-1-jim.cromie@gmail.com/ v2: https://lore.kernel.org/lkml/20200613155738.2249399-1-jim.cromie@gmail.com/ v1: https://lore.kernel.org/lkml/20200605162645.289174-1-jim.cromie@gmail.com/ Jim Cromie (17): Patchset starts with 11 cleanups; - change section name from vague "__verbose" to "__dyndbg" - cleaner docs, drop obsolete comment & useless debug prints, refine verbosity, fix a BUG_ON, ram reporting miscounts. etc.. dyndbg-docs: eschew file /full/path query in docs dyndbg-docs: initialization is done early, not arch dyndbg: drop obsolete comment on ddebug_proc_open dyndbg: refine debug verbosity; 1 is basic, 2 more chatty dyndbg: rename __verbose section to __dyndbg dyndbg: fix overcounting of ram used by dyndbg dyndbg: fix a BUG_ON in ddebug_describe_flags dyndbg: fix pr_err with empty string dyndbg: prefer declarative init in caller, to memset in callee dyndbg: make ddebug_tables list LIFO for add/remove_module dyndbg: use gcc ?: to reduce word count accept combined file:line & file:func forms file inode.c:100-200 # file & line-range file inode.c:start_* # file & function dyndbg: refactor parse_linerange out of ddebug_parse_query dyndbg: accept 'file foo.c:func1' and 'file foo.c:10-100' accept keyword=value, not just "keyword value" (and not keyword:value) dyndbg: accept query terms like file=bar and module=foo dyndbg: export ddebug_exec_queries This will afford module authors complete run-time control over all the *pr_debug* callsites theyve coded. They can attach a callback to their existing debug interface (drm.debug for example), and map bits, bytes, or strings to particular queries. dyndbg: allow anchored match on format query term This makes "format=^PCI" work, which is far more specific than just "format=PCI". It is ideal for the most common convention in logging; a string prefix which classifies the log-entry in some way. dyndbg: combine flags & mask into a struct, simplify with it 1 less parameter on the stack. .../admin-guide/dynamic-debug-howto.rst | 29 +- include/asm-generic/vmlinux.lds.h | 6 +- include/linux/dynamic_debug.h | 4 +- kernel/module.c | 2 +- lib/dynamic_debug.c | 263 ++++++++++-------- 5 files changed, 169 insertions(+), 135 deletions(-) -- 2.26.2