Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4099875pxf; Tue, 16 Mar 2021 05:55:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLTx1EKwkY/Qlc5ukyjP8kB4BXLcWLgwvwORTk/XhQEdSrWkBZoYZ8UwxTisf5Fyzr43jA X-Received: by 2002:a05:6402:2058:: with SMTP id bc24mr36337709edb.243.1615899322060; Tue, 16 Mar 2021 05:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615899322; cv=none; d=google.com; s=arc-20160816; b=yC+fnMqh0AZ4feKoFs3szRF4da5Q+S2L2QLXguMoRx1HfzH1Qt8Rw4702SqdC9nU0g Lk71DXYoY1GbP3ExJyDoAdV8KOuq0Q+WzNCyLVZcdgZDwYlmlZZt76f88aXxLxHNEBkU 4xxyLujUpsyhRM064s09hfiW66REgHmdQOMrEDsPwZkvBvT48+hEXTEb6sCprz9oO+XG 3qtBoMelbb5mKOyeKvqh+ybx5R/FuwmGWTSjT2JdWV3A7jnW99f+ZiTD4Z/ZVOK8adY4 tOflt41Ac6IdSAB3SlsQrdsseO+4C/k5w0xD6B0OqM0jTVIXwkV+Ejmx+NaJdK45raks x8Vw== 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=vhYSMBoAMdltkZMW4za7BQw7Eq1RdA2946QBXoxuj2o=; b=Hi8VNdBuC9CcQKGxpWX1tijZ7kcJEiEc8oUJJq6kKtv02SbjZ3s8puOhc9q/avz/yD wCm2kEsIY8e78wBl72qmKRmxlHCni5KzSO+UKDU2IISj3kUK5MqYxJPHoakbsj/D98VA TWPTdVUbSDJrGcJYyKbAK8TlaBIHJKXSJnqMdzmkzv8r4MUynh4OjFyf3oFnNq+RjVrL PfOjV2tCiwDf+E++3RyzbWTcPOxkJZti8VxsTXvMHvLRTMzDx6uvYdimfhc5IwNuMmla XstOeFEJEU2bc+6iCNbGzqkEuQ8QRUg2ntHxqRt6PJAaW6LR3/cczftfwTQgzt7Fzd5+ cH7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LkeTT5yV; 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 hp34si14119855ejc.328.2021.03.16.05.54.59; Tue, 16 Mar 2021 05:55:22 -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=LkeTT5yV; 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 S235255AbhCPFJC (ORCPT + 99 others); Tue, 16 Mar 2021 01:09:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235193AbhCPFI1 (ORCPT ); Tue, 16 Mar 2021 01:08:27 -0400 Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99287C06174A for ; Mon, 15 Mar 2021 22:08:27 -0700 (PDT) Received: by mail-il1-x133.google.com with SMTP id f10so11547144ilq.5 for ; Mon, 15 Mar 2021 22:08:27 -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=vhYSMBoAMdltkZMW4za7BQw7Eq1RdA2946QBXoxuj2o=; b=LkeTT5yVwa5c5v+HxQKpGmb1zVN8wHi19QgQrDaOd+Ph+pC8QwpWiMvtqZLZhQAcng 4RQRMa8knGDT325vSQwvdiwXug+DDvfctZ+yUFGDPLI1enatboiswxnm4szSkSciXCKZ HFZs/H3fVtAWLOv2Iayz01TZwGviVdQDIIwOHMnNd2dJCmNNVKMvjUoAO1sIB1cywJLk dVxTi/ERmCGrAhNIlmw2/GpeMR1+m+tGwxAauNR7/hQD1AZSzsqghaKWEfSandbQdw/e /xKBkjdGYy8m3ObQKbDJeVDMkD8JjPuSivVXJZv1YPKcrAF443pUmYSWqLuFKeQdbqj1 Geaw== 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=vhYSMBoAMdltkZMW4za7BQw7Eq1RdA2946QBXoxuj2o=; b=kt/+nu322ccRWNGzf/dSgWU4W4iWxmHLZ2aZjx28EiHP1r5C56Xyo5SOKNpDdR7dhX xNrQPkolDKOLDxa/b/qG/dzD0R2Hi5GBE9JRop5Om6HJ265I2GSB7xVpzn4ANCR8+xot 8djyI4piCvm7HourLFfOlBhK77bgZgc9UhKy3IBDqVV2xGzLzYLsZSMgjxqZKdMURK/b C6xPDwZQSBj2E1JNtI5QFkmMIydmj+p/ctwJ0QiDgVzjVIT8rErZz8ykeljGmm9MhAIG jHFEUDIWn5fzvuK89e9pWrRRJbyHza55hBSU2kAXIhKTgDuIA6auU6O2Ktpe4sWLi40g EQbQ== X-Gm-Message-State: AOAM530cRj8AKL0u0kcbO1X2Tyu9m7vGmO7QV/qGMErspcGOwjr98ljx /Mc/IEBXv1GDFW4oZSFgY9o= X-Received: by 2002:a92:d6cc:: with SMTP id z12mr2292225ilp.226.1615871307097; Mon, 15 Mar 2021 22:08:27 -0700 (PDT) Received: from frodo.mearth (c-24-9-77-57.hsd1.co.comcast.net. [24.9.77.57]) by smtp.googlemail.com with ESMTPSA id y9sm8587469ill.15.2021.03.15.22.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 22:08:26 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: Jim Cromie Subject: [RFC PATCH v3 08/18] dyndbg: accept null site in ddebug_proc_show Date: Mon, 15 Mar 2021 23:07:51 -0600 Message-Id: <20210316050801.2446401-9-jim.cromie@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210316050801.2446401-1-jim.cromie@gmail.com> References: <20210316050801.2446401-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 0c535f3c2ba9..1f0cac4a66af 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -918,18 +918,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.29.2