Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4915228pxj; Tue, 22 Jun 2021 10:44:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+BGBLOxRE5o+nneYU0p6trowdMW6iiO7BgYfo1AoeaG5aFLAkagG749QcSMoppjpYPYLL X-Received: by 2002:a02:a916:: with SMTP id n22mr5103643jam.110.1624383855406; Tue, 22 Jun 2021 10:44:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624383855; cv=none; d=google.com; s=arc-20160816; b=HbI3G7hE77CrUZIEGyZN/sfC31dMX1FWUYcutcmFNR2PUkhkNCk9mrUBMg1gvWhHyo 7e7Z6XoozhU9231tw2XSBFdrJRh41SskBHSGOn7GswoBR3sH5BboKZITWQF8nvUnWRBv ti/puFK/4vtF8sKBaJXiE0dE8FPV9AA0OKcXM513/hT5QS9pKBJPHiuEQGAi3vPRg0PA rLUU8xg4EE7jthhPF3SVWCoeoGrAZNdOTa9MYf04XoqlYNMr2pZwpuGPOqaPopp6dKzR HJkN843+kUlTgSx4pefJV4EVRcroQiYyA0ysnFhl404ve2I695aXleiVFepGlplUjcGW iJWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=imH1BwFktM/8y8AlTYXqEmd3pVHmO857BIXs0qu4fEs=; b=NFcRG4HELzPP0vGfwIrQao2mSBawA83m0gODH1fs6GzHE0IaMm+1+ePjpTKWN2EF5c +v50uB3Eel/URteUQylN5DjY12wQqciTRdg7REMN/S4JSrTPR1Tk00XaRF7yjgN6S7nX w7KfI/LqNCOhbTqDKX1XfAVnCDyt1B6Rg9jrNbELuQSLvRoLeyZ8tyRA23Q10SKIFzUS 8u2/wr2jeQMIC/fPmlkgSeMypcqZ3AHMNnYWl/McuGN5cq6b2p1GnG7lMyuXTuGpvwKA U5cp/4XGdLFXRZrX8zpICA6Z+Acs4+ipRMvKs/KsyymRSHfMzi7PpP115+531hmZUBE4 7uXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BuUaok2S; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si22347941iob.78.2021.06.22.10.44.03; Tue, 22 Jun 2021 10:44:15 -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=@kernel.org header.s=k20201202 header.b=BuUaok2S; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232356AbhFVRpN (ORCPT + 99 others); Tue, 22 Jun 2021 13:45:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:48314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232301AbhFVRpH (ORCPT ); Tue, 22 Jun 2021 13:45:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4FEBD60720; Tue, 22 Jun 2021 17:42:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624383771; bh=AdNNC8o9THyCPkVQW5qscu3FI9w1HH+6jr1PCtqb1Q0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BuUaok2S0pfxbCbyv4kUBId+/dPCEvf8XmanC4CYP9caxpRBxb7U7CZWgF+9tHVIc /CBf5C1EAcICRWycYEE006yhknN5fpaQCIK5NCbwpBjbjJ86IrM7aM2ns/jtWT+s4v k9b7Y6coVds0foRMwQzZ+Byo6XaELtC9i8okUwT+UQf3+sn20sspTchLQ1JV+vk6Jm 0uzVB2bBnhMjdhVaX2qu7vWTa3NkKaUHRQb6DQ5J+HACxg/CTQ6PfTDYW21NPSNQPM AjLqY8atsh1QaGc8uXbKMGTGzZtLi2UMLZr48cTarxfngM8ZHOrcRXB9rS+sGnwJ2o ezkC1+mRKY5Iw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id EF15640B1A; Tue, 22 Jun 2021 14:42:47 -0300 (-03) Date: Tue, 22 Jun 2021 14:42:47 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: John Garry , 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 Subject: Re: perf tool: About tests debug level Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Jun 22, 2021 at 09:00:31AM -0700, Ian Rogers escreveu: > On Tue, Jun 22, 2021 at 4:58 AM John Garry wrote: > > > > 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 > > I think this sounds good. It'd be nice also to have verbose output in > the shell tests following the same convention. There's currently no > verbose logging in shell tests but I propose it here: > https://lore.kernel.org/lkml/20210621215648.2991319-1-irogers@google.com/ > By their nature some of the shell tests launch perf, perhaps there can > be some convention on passing the verbose flag through in those cases. Hey, there is even a v2 for that one, lemme process it :-) - Arnaldo