Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3712566pxt; Tue, 10 Aug 2021 09:36:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuhfg5eGL1ghH5k+fgQlYeM8xD8nvaE84thtRBUfhmG92WcKo7kMujoU1J+mwHnE3qCCwG X-Received: by 2002:a05:6602:26d2:: with SMTP id g18mr25331ioo.194.1628613377109; Tue, 10 Aug 2021 09:36:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628613377; cv=none; d=google.com; s=arc-20160816; b=DPCuKD3HNAKrxVdyQRmlPntXv0Qf0W9hEqc7rTd+yL0ic92FCUrb44vrGVS3VDu7Iq fdLktziavRixhr4T6V4s+d/y+b0DzUUHdSNmQjqMxIwn+vDxoVlJaIRU/l04vxOyX/QR 9e7OWYs4mEYdGus+GdLlxCEKylgV3JwK7Oala+3l/1x7vg2IM05eGu7yQF09d9CW5Jpr Ro7d8eBdf0aUJ8UC5sIe7V7XYg0DVEQKllFOngL7pEkU/j0U7FKqicWnY/09U+R4D0Xa 2gvNEwk2Oh8sR2gqfNUcmJKUEhffgn2uRYixK5iHjovEXwn1KEGXRttpNRXmX7KhMuLo SvLw== 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=umYMU6fM5Km+ZqpHGGeyZEyBmccL2F0AAccYyIYQtj8=; b=ITMweQjgXf4yWuXeI5Lr/z0vCr9rOT64uHzpXYzXudbEEYWPSzEwwk58OCm4my04Sv T7QYK8I/kYxguo2DdI7tSY4BcEYADajwg8H7FWb9abHUWbX/avq1wBKSCfBslHhMVviD 3wCcy/ewzDePGnMlSFYD8BomuBS4axGJZ9Nn5HgTUepVH8NyrnGgdWsMV2zYNjsM61hW 6rMAzKut7LG0JDtds2+MEsHzL1SyLhoXv1/7IQDdIXnO/NnJH6cehkyRqMyps9SjfTKu ggEOWzdspt+Y3uJ1uZzw/sFx99AzzlyphELTL9w7G4XCk6GlZzGwCM82cwDezxVnTNGI 4jzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eW02T+ZP; 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 s5si9085592ilv.59.2021.08.10.09.36.04; Tue, 10 Aug 2021 09:36:17 -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=eW02T+ZP; 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 S241741AbhHJOIM (ORCPT + 99 others); Tue, 10 Aug 2021 10:08:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:41536 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238554AbhHJOIL (ORCPT ); Tue, 10 Aug 2021 10:08:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0F87A60F41; Tue, 10 Aug 2021 14:07:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628604469; bh=fuZaM92NMwEjwHL4v3wyfLCUEczcXE1BVry4drvjgIY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eW02T+ZPCQk0NsOoyktfO5bMfoj75bUx9IhvAD4fzIO8RWh/kaztN3D4L41WrJUt4 TdRDBaxbWcRGKFiLdyYSqUHiYtrkdDjZ7fsUpz4g2c761oH3DgPEFNb2zhfwPwpt8Q MtIFwGWvX/gHQv4AS3Rqjr1REqQLT+cPwSff0D6TD/hRq94oRonbEIudTsxkTJekCk IXMQySE/gKtM7NDKIGXnQfifcrIa5b7/cQzT3OvJq4lDVHMD7utSqgUBIbHsVfyOBC misMURDErIbit1Sau0xB1JBvZB97hdJZfHSgSzhvgE/JQ9wjcH3dKpDy30S0OiI1pR CRYqDMlhLdtPQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 75BEC403F2; Tue, 10 Aug 2021 11:07:46 -0300 (-03) Date: Tue, 10 Aug 2021 11:07:46 -0300 From: Arnaldo Carvalho de Melo To: Riccardo Mancini Cc: Arnaldo Carvalho de Melo , Ian Rogers , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH] perf bench: add benchmark for evlist open/close operations Message-ID: References: <20210809201101.277594-1-rickyman7@gmail.com> 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, Aug 10, 2021 at 11:03:22AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Aug 10, 2021 at 12:31:55PM +0200, Riccardo Mancini escreveu: > > Unrelated to this small issue, I noticed I forgot to check the return of > > bench__create_evlist. Would you like me to send a v2 fixing both issues or are > > you able to apply this other small change yourself? > Nah, as this is the HEAD right now in my local branch, I'll apply it > myself, thanks! Also you forgot another check for this same function (bench__create_evlist()), before that loop. I'm fixing that as well. > - Arnaldo > > > diff --git a/tools/perf/bench/evlist-open-close.c b/tools/perf/bench/evlist-open-close.c > > index 40bce06f5ca7bef3..f0b9c330f34f2984 100644 > > --- a/tools/perf/bench/evlist-open-close.c > > +++ b/tools/perf/bench/evlist-open-close.c > > @@ -168,7 +168,11 @@ static int bench_evlist_open_close__run(char *evstr) > > > > for (i = 0; i < iterations; i++) { > > pr_debug("Started iteration %d\n", i); > > + > > evlist = bench__create_evlist(evstr); > > + if (!evlist) > > + return -ENOMEM; > > + > > gettimeofday(&start, NULL); > > err = bench__do_evlist_open_close(evlist);