Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp68353imm; Wed, 5 Sep 2018 15:08:09 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbw+ztTVH6q3/vmWaBPAgkDxCfce9YPxf1jdudGNjeQNCl9kgcH3YKfDBZOe0CHEQoJLHfv X-Received: by 2002:a62:63c2:: with SMTP id x185-v6mr42739636pfb.13.1536185289633; Wed, 05 Sep 2018 15:08:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536185289; cv=none; d=google.com; s=arc-20160816; b=pL6dsEbgM73XZUNoiOWvbEKzPlsz18KOG5DIYf3l1rsXcXxTlpVSPHEvOhUAacYX5L SIG3lCnyBSySVemRyQuf5oWjiw332vvv4ohhCXKY4eKFHiiIrobRpM66Q3RvT66sAtxg 22ai3iY8NGnsc40gJzD2GzofkUQfbkg5Hkl767jAVhW8QJSEweLMwLxDZQfEv2bl/Rbs Vh0gE+FyG5HqB7HfzNrTKdCm4Gb2tW+8P5Y1TPqksTZtzbwsT8BoBury4Wa8HqwH9yT3 d/RYhQSmfOzv//iiK2A4XT07XHC2bCVnDMNBX6Ibd1P9/EY6pal/6q1wKxuft4GDPs0B QEWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=W4QZWA6NiozYIXxh+w/7gqxHWkizGjH8xSc+kp83uXM=; b=UGjpP0daBIfvRxjrlRyuq8rXCBmQf9w+h/ZKl97QzW5MIbHcRBjRgmNpr+pMT508PB VoPCT5KQj/1kjjIZhZJ/1F2tEwjbBMx1ftXrTa9CDGQyxpQqfItMgSp5w1D9/8VzVnaf zCS+Sa3+kFmjK2pt2SPU2y24htGUBFKuLovp7LyYcILkOOfZATmfIboo3V6Mw8a5FUcX rEGSLdnqI3ktPgqQ9TAv3+RhSHQqeTyLJcKNlJJIeP5ocgpay328UbfcJ4g8V/XJcET3 r4Ipi9KAC+HtVxlpSf1Bm9LTq85qrgntG7nEHgfx8VPgpnNjftnFzPntiG+Ek4ToUCXi u00g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Yo3Phkxo; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 12-v6si3247288plb.203.2018.09.05.15.07.54; Wed, 05 Sep 2018 15:08:09 -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=@kernel.org header.s=default header.b=Yo3Phkxo; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728532AbeIFCi2 (ORCPT + 99 others); Wed, 5 Sep 2018 22:38:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:52940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728389AbeIFCi1 (ORCPT ); Wed, 5 Sep 2018 22:38:27 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BA0102083E; Wed, 5 Sep 2018 22:06:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536185176; bh=3YMJ5M/Z1KlHqB5qPIYm0cuJIWHfnwoG9nbtL1fHFiU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yo3PhkxoaKYnnvngqoHd5sylssOPuzmb6tWbWhtDZP1VO4MYzJ6t+xm6F0eqaNEyr X3Kn1KdeQCKHiqAwUWGMIc8kdADCs9Sh2JkFXO5W7HTGRpoHXJGXeuqCsdZhnuJrFC 11pPRmQ49oMEmed0107v92xRxUDTKyVQ2+Ra+jI4= From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Jiri Olsa , Alexander Shishkin , Andi Kleen , David Ahern , Namhyung Kim , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: [PATCH 31/77] perf tools: Switch 'session' argument to 'evlist' in perf_event__synthesize_attrs() Date: Wed, 5 Sep 2018 19:03:54 -0300 Message-Id: <20180905220440.20256-32-acme@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180905220440.20256-1-acme@kernel.org> References: <20180905220440.20256-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiri Olsa To be able to pass in other than session's evlist. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-record.c | 2 +- tools/perf/builtin-stat.c | 2 +- tools/perf/util/header.c | 6 +++--- tools/perf/util/header.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 22ebeb92ac51..9853552bcf16 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -758,7 +758,7 @@ static int record__synthesize(struct record *rec, bool tail) * We need to synthesize events first, because some * features works on top of them (on report side). */ - err = perf_event__synthesize_attrs(tool, session, + err = perf_event__synthesize_attrs(tool, rec->evlist, process_synthesized_event); if (err < 0) { pr_err("Couldn't synthesize attrs.\n"); diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 48c88f568fe1..8291f503d0cc 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -459,7 +459,7 @@ static int perf_stat_synthesize_config(bool is_pipe) int err; if (is_pipe) { - err = perf_event__synthesize_attrs(NULL, perf_stat.session, + err = perf_event__synthesize_attrs(NULL, evsel_list, process_synthesized_event); if (err < 0) { pr_err("Couldn't synthesize attrs.\n"); diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 3cadc252dd89..91e6d9cfd906 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -3637,13 +3637,13 @@ size_t perf_event__fprintf_event_update(union perf_event *event, FILE *fp) } int perf_event__synthesize_attrs(struct perf_tool *tool, - struct perf_session *session, - perf_event__handler_t process) + struct perf_evlist *evlist, + perf_event__handler_t process) { struct perf_evsel *evsel; int err = 0; - evlist__for_each_entry(session->evlist, evsel) { + evlist__for_each_entry(evlist, evsel) { err = perf_event__synthesize_attr(tool, &evsel->attr, evsel->ids, evsel->id, process); if (err) { diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h index 6d7fe44aadc0..ff2a1263fb9b 100644 --- a/tools/perf/util/header.h +++ b/tools/perf/util/header.h @@ -124,7 +124,7 @@ int perf_event__synthesize_attr(struct perf_tool *tool, struct perf_event_attr *attr, u32 ids, u64 *id, perf_event__handler_t process); int perf_event__synthesize_attrs(struct perf_tool *tool, - struct perf_session *session, + struct perf_evlist *evlist, perf_event__handler_t process); int perf_event__synthesize_event_update_unit(struct perf_tool *tool, struct perf_evsel *evsel, -- 2.14.4