[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cd501541-deb5-f2f5-e086-cca44b40c87d@huawei.com>
Date: Tue, 22 Jun 2021 12:52:01 +0100
From: John Garry <john.garry@...wei.com>
To: Ian Rogers <irogers@...gle.com>
CC: Arnaldo Carvalho de Melo <acme@...nel.org>,
Jiri Olsa <jolsa@...hat.com>,
"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>,
"Jin Yao" <yao.jin@...ux.intel.com>
Subject: Re: perf tool: About tests debug level
On 22/06/2021 06:04, Ian Rogers wrote:
>> ---- end ----
>> Parse and process metrics: FAILED!
>>
>> Note that the "FAILED" messages from the test code come from pr_debug().
>>
>> In a way, I feel that pr_debug()/err from the test is more important
>> than pr_debug() from the core code (when running a test).
>>
>> Any opinion on this or how to improve (if anyone agrees with me)? Or am
>> I missing something? Or is it not so important?
> Hi John,
>
Hi Ian,
> I think the issue is that in the parsing you don't know it's broken
> until something goes wrong. Putting everything on pr_err would cause
> spam in the not broken case.
Right, I would not suggest using pr_err everywhere.
> Improving the parsing error handling is a
> big task with lex and yacc to some extent getting in the way. Perhaps
> a middle way is to have a parameter to the parser that logs more, and
> recursively call this in the parser when parsing fails. I guess there
> is also a danger of a performance hit.
So I am thinking that for running a test, -v means different levels logs
for test code and for core (non-test code). For example, -v prints
pr_warn() and higher for test logs, but nothing for core logs. And then
-vv for running a test gives pr_debug and above for test logs, and
pr_warn and above for core logs. Or something like that.
Maybe that is not a good idea. But I'm just saying that it's hard to
debug currently at -v for tests.
Thanks,
John
Powered by blists - more mailing lists