Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1421318pxj; Sat, 29 May 2021 13:04:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4pJ8QWljvwYrAN3z93X8+AFptMe/9FPvCQqM2B4MBZiQk8iYTW/Ls4nmf736+YVpMM83O X-Received: by 2002:a02:aa97:: with SMTP id u23mr13718481jai.13.1622318643710; Sat, 29 May 2021 13:04:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622318643; cv=none; d=google.com; s=arc-20160816; b=rfOK9CGfL7OEa2e+bMntKbtEg0Pwhl0kezh/pVv2uyADDjxlq8shCkj08j7kqGKAia Px3WQIm7LbC9GduVO4tPmNMCYQ9BcmnKf6iXequmtZoBdvhv3h/9JRJjWusUg2bGOflA nIdW9vk/fQaXxBZI0WOgwlxr0W1VrUSmjDbJ4rDScjZzXXXmFQFBhHKiw82ulFXRBWhM eo1WB6IPaTy1U2M9Mf1kRcCfl2Gd3/kXBngLAufBriLC0V3BSHEFMNc8bmv1hpP5+7zy VJaApzfv/ohBIsx5awY/4YQZQXgM6yommu/GhWMrjEQpOAcFOoU391yBp3tJIeAdIVo5 AEvA== 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=AWeRePfcuekAOmsvrqglio6uI9lGeW+QJSWDx1i3w1k=; b=ClAi0mTrt9THpGBIqZSbUqriLdTdebPBQ3C+3esWX2NQuf81DWp6mdkegYMp09i9GD Clp4qvoONI70XWcre6vEiTHMtfLKXALxMNbl09cGQ+qWSSJzRKl6dcNT27LehB192tc4 LWgWNJNqGOFiyBfCv/CWGTPxzVk6ZFp8rA8XoYSJe4EXY1oTPpBR07CQTpdDH7sAA2qU B6UHTo2WNhWNIy7a4KYyj6xfrugxJiKPtVHGiXNcspFdMaQXw7dAR7NaPUb61rNO8Jc4 b6iEV7o7XCugqf9/bpec9FEEoHKkMMQKyEZXUDhoT1XulrZeKIBmXC74ZS/VFq5Rky4V DPTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e9f10CbO; 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 s13si11054905ilu.55.2021.05.29.13.03.42; Sat, 29 May 2021 13:04:03 -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=e9f10CbO; 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 S230026AbhE2UET (ORCPT + 99 others); Sat, 29 May 2021 16:04:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229854AbhE2UED (ORCPT ); Sat, 29 May 2021 16:04:03 -0400 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 115FCC061763 for ; Sat, 29 May 2021 13:02:26 -0700 (PDT) Received: by mail-oi1-x231.google.com with SMTP id x15so7949262oic.13 for ; Sat, 29 May 2021 13:02:26 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=AWeRePfcuekAOmsvrqglio6uI9lGeW+QJSWDx1i3w1k=; b=e9f10CbO5mzNQcL71mBPBI8CFGDKZ8ul65fD7Geg+xUgi3QpHCFayMNMF40m9rbH1a JCBiDkL0IYtGDz/y9/VsdJrJV9tauLf5GmQLnx/4z8YoWC3h+7DOtjZVQxvemcvcjVdp EX1QsBJI/3pGZQT7/O0Gaq58yWUOa95QwPDCZs/jexzrDjJUrE/HAAGxdngmjfE3w6ec cPR1l1nu44UU+kBsVsN64LOzWrndJp36JQYMtJAaFSK4zWwAe3NkJqtK1mvl5UW+G2sc jTUPltRC45AQ5G+xMEO8M86Zr2uogFaXt2HFgYxWCO3bwiP9GdxA3K11f4DEEPELKVkN 6OUA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=AWeRePfcuekAOmsvrqglio6uI9lGeW+QJSWDx1i3w1k=; b=QXCMN+mYmuYjdvGJfsglWQfW1JsKexZHVlB0yFvS8nETsEzq3G5050KEH1OFlrKnsw HcqYKoBMeyCEuwCSLRD8Bvtu3GbluepL8nEPZf3ld2nPRKxYSO/W5QiSucO7VN5Sa4qv DcNmclQ/58NLLCYHMBeckSCfOXwp2iSSLL0o8LI+9m+/Kmi7vCrD1cYORkJ8ZwIMysAR Hs6QJ8tOR+Rbuyk9NtGei0D0ypov0x/ajScM7L4edF7iff3GCc6+5sYP+2MjR+nqnMqz D8zTsyubUFznfR8DimbFNhA6yYsBc0MYh+KlY2P6u1yyGloMDU7zD9CdGSwKLJ/j0Nwx 6qbg== X-Gm-Message-State: AOAM531mn7tc8NmSumTlAbyfqEYXgbCI/UbloiY3rzd7gDQ3F9YoUXEh JvU0YEZOPyzDFIuamaGfhd8= X-Received: by 2002:a54:4192:: with SMTP id 18mr13144277oiy.84.1622318545447; Sat, 29 May 2021 13:02:25 -0700 (PDT) Received: from frodo.. (c-24-9-77-57.hsd1.co.comcast.net. [24.9.77.57]) by smtp.googlemail.com with ESMTPSA id t39sm1868064ooi.42.2021.05.29.13.02.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 May 2021 13:02:25 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: Jim Cromie Subject: [RFC PATCH v6 12/34] dyndbg: accept null site in ddebug_proc_show Date: Sat, 29 May 2021 14:00:07 -0600 Message-Id: <20210529200029.205306-13-jim.cromie@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210529200029.205306-1-jim.cromie@gmail.com> References: <20210529200029.205306-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Accept a ddebug record with a null site pointer, and write abbreviated output for that record that doesn't include site info (but does include line-number, since that can be used in >control queries). Also add a 2nd header line with a template for the new output. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 868f56edf831..592aaaf79fd7 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -924,18 +924,27 @@ static int ddebug_proc_show(struct seq_file *m, void *p) if (p == SEQ_START_TOKEN) { seq_puts(m, - "# filename:lineno [module]function flags format\n"); + "#: filename:lineno [module]function flags format\n" + "#| [module]:lineno flags format\n" + ); return 0; } dc = dp->site; - - seq_printf(m, "%s:%u [%s]%s =%s \"", - trim_prefix(dc->filename), dp->lineno, - iter->table->mod_name, dc->function, - ddebug_describe_flags(dp->flags, &flags)); - seq_escape(m, dp->format, "\t\r\n\""); - seq_puts(m, "\"\n"); + if (dc) { + seq_printf(m, "%s:%u [%s]%s =%s \"", + trim_prefix(dc->filename), dp->lineno, + iter->table->mod_name, dc->function, + ddebug_describe_flags(dp->flags, &flags)); + seq_escape(m, dp->format, "\t\r\n\""); + seq_puts(m, "\"\n"); + } else { + seq_printf(m, "[%s]:%u =%s \"", + iter->table->mod_name, dp->lineno, + ddebug_describe_flags(dp->flags, &flags)); + seq_escape(m, dp->format, "\t\r\n\""); + seq_puts(m, "\"\n"); + } return 0; } -- 2.31.1