Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4639768pxj; Tue, 22 Jun 2021 05:00:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiEfnU5Vqrz0/Va6sfdHKiKTZVUPsaF8kmo77YVF/dG3+1qf1sh7WZffv19HbmPd9nLUtA X-Received: by 2002:aa7:d34f:: with SMTP id m15mr4260091edr.311.1624363200979; Tue, 22 Jun 2021 05:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624363200; cv=none; d=google.com; s=arc-20160816; b=bGyaclbIPG3VJMSCznWxMusK5T0MGgRkU36tkxcgoSn9DC7857rcgn9UvHL70gDsTJ Z0rGJOR1f275TupXXWKg3tT050S+PgtDd4AxfLuBgeR3RV+0h+OqoSauvjjxfQDkmaJl zIv2+Ot9JWpboEnFi5W455NbbNwZUfB5mZ/jMcPk3YG7/6fMMz5l6mS+hR+VolW2ULkl MeA81XlvXmp6fRoCGanIAfmpYt00pc2Ko3vMvDbUssBtNS7jTB5L/KBYJ7RWEyBiYjdP /LePpHYM0bJ8mHabY6PS87z0KCyy25MrhUzuwpyGwDNgSsnHBb/A9foyu71rIX7NGXuz cwxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=48zVBVAPoSLxmTpM+QZpJV6WKplz94TjdULOrYigGNE=; b=m9VuOtThwZfDc1Y1aeBfrmYaLn/7qPaka/+AN9S1e20sNQ6dOL3otAffX+RKWMKb+7 Xo3AUQj9WU9qmfN0Gu97oRWigMEGncGpR2ThhXpIaobWcf/nwRVBgGtNtjeC3b6w91lp n6SeRm4SEg2FgFsQy2/gnuGkFa39ZM09Cb7tzMLmM64rldH3ql50kmM+DwqR6osIX4C0 OoF7owjojKxJlmXJ0NgWh5HP/5iimsijpJSHWiZS5yqXJMh50hSz/SGAB/1tJs9MkIpF KB0GNVNLp2tlKOJxwJH/gtr6rillL1HiYqQKDpQpO/wa3uLXVAl9hypfKpGtidW8DHT7 on7Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h7si12430260edr.469.2021.06.22.04.59.38; Tue, 22 Jun 2021 05:00:00 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231164AbhFVMAv (ORCPT + 99 others); Tue, 22 Jun 2021 08:00:51 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3300 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229913AbhFVMAr (ORCPT ); Tue, 22 Jun 2021 08:00:47 -0400 Received: from fraeml740-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4G8PmY70gwz6H71c; Tue, 22 Jun 2021 19:48:29 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml740-chm.china.huawei.com (10.206.15.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 22 Jun 2021 13:58:29 +0200 Received: from [10.47.89.126] (10.47.89.126) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 22 Jun 2021 12:58:28 +0100 Subject: Re: perf tool: About tests debug level To: Ian Rogers CC: Arnaldo Carvalho de Melo , Jiri Olsa , "linux-perf-users@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Namhyung Kim , "Jin Yao" References: From: John Garry Message-ID: Date: Tue, 22 Jun 2021 12:52:01 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.89.126] X-ClientProxiedBy: lhreml721-chm.china.huawei.com (10.201.108.72) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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