From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933131AbeAIPh0 (ORCPT + 1 other); Tue, 9 Jan 2018 10:37:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35738 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758778AbeAIPhW (ORCPT ); Tue, 9 Jan 2018 10:37:22 -0500 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , David Ahern , Andi Kleen , Alexander Shishkin , Peter Zijlstra Subject: [PATCH 35/49] perf tools: Add threads debug variable Date: Tue, 9 Jan 2018 16:35:08 +0100 Message-Id: <20180109153522.14116-36-jolsa@kernel.org> In-Reply-To: <20180109153522.14116-1-jolsa@kernel.org> References: <20180109153522.14116-1-jolsa@kernel.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 09 Jan 2018 15:37:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: To separate thread debug messages from global verbose, to enable type: $ perf --debug threads=X record ... where X is the debug level. Link: http://lkml.kernel.org/n/tip-tgpv7s1pjnxgfw7c90mg5tpl@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/Documentation/perf.txt | 1 + tools/perf/util/debug.c | 2 ++ tools/perf/util/debug.h | 1 + 3 files changed, 4 insertions(+) diff --git a/tools/perf/Documentation/perf.txt b/tools/perf/Documentation/perf.txt index 864e37597252..5ae38692af64 100644 --- a/tools/perf/Documentation/perf.txt +++ b/tools/perf/Documentation/perf.txt @@ -22,6 +22,7 @@ OPTIONS verbose - general debug messages ordered-events - ordered events object debug messages data-convert - data convert command debug messages + threads - threads debug/stats messages --buildid-dir:: Setup buildid cache directory. It has higher priority than diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c index f3a71db83947..74cc701b9615 100644 --- a/tools/perf/util/debug.c +++ b/tools/perf/util/debug.c @@ -28,6 +28,7 @@ bool dump_trace = false, quiet = false; int debug_ordered_events; static int redirect_to_stderr; int debug_data_convert; +int debug_threads; int veprintf(int level, int var, const char *fmt, va_list args) { @@ -180,6 +181,7 @@ static struct debug_variable { { .name = "ordered-events", .ptr = &debug_ordered_events}, { .name = "stderr", .ptr = &redirect_to_stderr}, { .name = "data-convert", .ptr = &debug_data_convert }, + { .name = "threads", .ptr = &debug_threads }, { .name = NULL, } }; diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h index 77445dfc5c7d..96665c66057b 100644 --- a/tools/perf/util/debug.h +++ b/tools/perf/util/debug.h @@ -15,6 +15,7 @@ extern int verbose; extern bool quiet, dump_trace; extern int debug_ordered_events; extern int debug_data_convert; +extern int debug_threads; #ifndef pr_fmt #define pr_fmt(fmt) fmt -- 2.13.6