Received: by 10.213.65.68 with SMTP id h4csp1173045imn; Wed, 14 Mar 2018 11:46:41 -0700 (PDT) X-Google-Smtp-Source: AG47ELseF4szi7Ysuj3075ULdfIWoJSzIjx6gCTX4OgF0XKVhjUyYf6jrLGqg7RzAaY5gIT2cef+ X-Received: by 2002:a17:902:1763:: with SMTP id i90-v6mr4897864pli.309.1521053201307; Wed, 14 Mar 2018 11:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521053201; cv=none; d=google.com; s=arc-20160816; b=bK9vhdO1atC/q6zk0p76F7+x+YloYPTih7tPi3OKhoKCE86b5KcpDHhpRAqjMVGDh4 91vm3RdNSoahJA8FXH+rbkI6Sk1p6D+1k6PsVJJBjIMJZ56INovxdwobwtIXJlyHAt1h fBu/6o0xvDAwwftsBFX+UDmcVj6DqlMSte2mgFqaqqLV2tQdI2s3kqv6mfGGGv/Hd44P r+Fhla8K2d8aMt52ES0tuQPHEMGft1XtmRkiFpdK/mO+x+YeP4uxwhVvL7UTn58Gi6Nb hH41fXAPIGmDFB2daS3t5OZbLon2xsMHbaM79wpzUeyTzTq+0DpnvR3EFohdwy1eoDVb OMwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=qsfAOY8mVTiLbxz2gRFkRqMaxAVb1MlysHg5C+mW2Xo=; b=Q3JUckuv9hn0Tl80ugMi7F9iPuH63E8nWsc/p+16RgVE2s360Jxi2S3HQOaXHjrw/D s+tzindrtgnCeuxTwtAV+DH0TtN+OhvE9n5sr5wHHPhtTwq6UMrDvXE+orTyWSVKMzXB dKA9pX26uTZflCfQAA3mjYxUwrW4INLqoLhMpR/uJpnlWCmhnVeA2/JwVLUeQ4V9cGtX PA5J4615Ri2DpdBCSKAAwUrbSZre5c9I5SOWSUqlecj+kT2Si+OxLwOX9h9bJvBmfT1J PXSgh6TUN1rRatUe5rd8181HWjUjv4vMjxH+JGAiNffxGgwoqtyn9pcGIZ6qv3wHeWa5 q05A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=TXowgXOo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n128si2265507pga.29.2018.03.14.11.46.26; Wed, 14 Mar 2018 11:46:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=TXowgXOo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751478AbeCNSpQ (ORCPT + 99 others); Wed, 14 Mar 2018 14:45:16 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:54013 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750950AbeCNSpP (ORCPT ); Wed, 14 Mar 2018 14:45:15 -0400 Received: by mail-it0-f65.google.com with SMTP id w63-v6so5869944ita.3 for ; Wed, 14 Mar 2018 11:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qsfAOY8mVTiLbxz2gRFkRqMaxAVb1MlysHg5C+mW2Xo=; b=TXowgXOobBt5p6gFF21pkyfHD7bi5Q31yWuEvPXy3b2ik7wyq1HZMWSMR7t17uT0uf oAglN56+Oc4+ItX5vWN1h7BOFrn4+cJbOGZOcXsM22vIqMFtdCU14c2k0Qn3tdXuQQ5E V72UOsw/rY3k+xzM5f0boQmBWsKV5BDyfT6FWwASC1fNjVlC0YKsBCKutut0Og42GwzA DKTerLhLb7PrGz7NblRqrZCz1gO9aRQcnm8L9mpbVCM7HQ6xCkJFVZjL/qBVzQDvytRW nE74NNGae8rIwQjhnRyC65kteM89ofs2Ep0uAR/ctXQJeUOquiFKEsjAG6JtWWvX6OTG BUJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qsfAOY8mVTiLbxz2gRFkRqMaxAVb1MlysHg5C+mW2Xo=; b=C1dTTOeQM32OGWN/z2qbqLIhFrJ8bQMfhnqMFmFXMXUbP1G8gcLjHjlqymVwKF+y+V WrFCU/v02Q7WO+08oUWwGbcfnZrGc21bqu0h2NbuLx4AOOdmbmSlSIo1BCobeP198jtO bZysT8jd/ApY/jPsMPiIwduRCEFOGwahpqWN1hA8VRcprcrAzYq1pWGv7FJqzX8QhcCQ uRn/v4m47EL2DwNZ8we5WQ7G9HBcshlPTcNEbAhYRYJeOeUrgtXf2LwaF5B8qktw19G1 zKDLUtISRC4E7QmTFbCFV3iUe8mM2Rqn8/silD/vDuFo6mvn2t5Lq+6yTF9To+1TxIGM 5AWg== X-Gm-Message-State: AElRT7EVvi3BhcbnqXII2U4oSaoG5pXiTMlf/NFEauQeWkPAFGuodO13 FNFeJ/67nTQAPQuRpsFItFJ1Fr7oTMPRuRO/EWIEMKbD X-Received: by 10.36.190.65 with SMTP id i62mr1229381itf.18.1521053114656; Wed, 14 Mar 2018 11:45:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.222.25 with HTTP; Wed, 14 Mar 2018 11:45:14 -0700 (PDT) In-Reply-To: <20180314092205.23291-1-jolsa@kernel.org> References: <20180314092205.23291-1-jolsa@kernel.org> From: Stephane Eranian Date: Wed, 14 Mar 2018 11:45:14 -0700 Message-ID: Subject: Re: [PATCH 1/2] perf record: Synthesize features before events in pipe mode To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , lkml , Ingo Molnar , Namhyung Kim , David Ahern , Alexander Shishkin , Peter Zijlstra Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 14, 2018 at 2:22 AM, Jiri Olsa wrote: > We need to synthesize events first, because some > features works on top of them (on report side). > > Link: http://lkml.kernel.org/n/tip-vz436m6fobfz8ykmuxo8phyy@git.kernel.org > Signed-off-by: Jiri Olsa Works for me. Tested-by: Stephane Eranian > --- > tools/perf/builtin-record.c | 18 +++++++++++------- > 1 file changed, 11 insertions(+), 7 deletions(-) > > diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c > index d33103291b02..22ebeb92ac51 100644 > --- a/tools/perf/builtin-record.c > +++ b/tools/perf/builtin-record.c > @@ -754,13 +754,10 @@ static int record__synthesize(struct record *rec, bool tail) > return 0; > > if (data->is_pipe) { > - err = perf_event__synthesize_features( > - tool, session, rec->evlist, process_synthesized_event); > - if (err < 0) { > - pr_err("Couldn't synthesize features.\n"); > - return err; > - } > - > + /* > + * We need to synthesize events first, because some > + * features works on top of them (on report side). > + */ > err = perf_event__synthesize_attrs(tool, session, > process_synthesized_event); > if (err < 0) { > @@ -768,6 +765,13 @@ static int record__synthesize(struct record *rec, bool tail) > goto out; > } > > + err = perf_event__synthesize_features(tool, session, rec->evlist, > + process_synthesized_event); > + if (err < 0) { > + pr_err("Couldn't synthesize features.\n"); > + return err; > + } > + > if (have_tracepoints(&rec->evlist->entries)) { > /* > * FIXME err <= 0 here actually means that > -- > 2.13.6 >