Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp68880imm; Wed, 5 Sep 2018 15:08:41 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbcTt85ksLCZWdK42p6diPobt+BVVRX7WK8mKH/pRDFp2mSKaRoeh95yww38Ijhi/6bt4E1 X-Received: by 2002:a63:f002:: with SMTP id k2-v6mr38353070pgh.8.1536185321117; Wed, 05 Sep 2018 15:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536185321; cv=none; d=google.com; s=arc-20160816; b=pDRHTrgUyGT0EvySmiCc6o66xLubsHRWqjRAd1BhPemNN6bPWLJqFBAoNkKg5iEkik bm1UtfC4RT0hRvY4OlH1KljGDItABfEUxmgj7mqZsl3mgf/aEHCIeLntxB9+BdQXKMSW r2iTCoHK2FVkX704Iim3JSaA0aHj8wqavS9oXEnulOXop0K7JmmvmTiBrXhhd7/UoOFY 4/8Fb10bmaBC/lMq8jzxxDWMH9yyLBP7tBOBknkFqhPN7fvyCSQm+SuEwn1buDfHmwce HiSC9G3m/0cam2FghEobDgi+hmn81mKQ+PaKJ2obO0jQ+1ge0shjT/ZO52FeIvnEnQDU tjhA== 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=f54FVXmG8nF9QfqkzZPfQHhjbKcJkoa4tKHKQVZmLCQ=; b=nBXO4kJAto3QKl4aAlY16qPICK4v0s03A4ScEMFon7VMn2KqCAY9bS2r5SP8bml0xE ygiUv4+FOCLJ8gEThmy9MaF+lQmJ8r3aIEJI0cIGgAiGvWmTPGthVfXAqdtuT32w31dj ihsuxzsmGmeeubstbTaSKN5x/gWE2kHshf+SKwglb+o1RNJTxI702ZzN+iKOpbbp/ZWy yVmtmmwG+BxC2nb9GKZb1+SH2vG9ljQsTOpio1B4E1eTZke9ROMgMbYENVZOm3WalhzS qsYuQk3QfXYymhhVa68kG6nVwY2mWkahF7/sWR8KMvs0W+Y8u/hOFy9H4FDCOeZ76hfD ZtSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BL6eU8QJ; 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 h69-v6si2706201pfc.121.2018.09.05.15.08.25; Wed, 05 Sep 2018 15:08: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=@kernel.org header.s=default header.b=BL6eU8QJ; 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 S1728591AbeIFCij (ORCPT + 99 others); Wed, 5 Sep 2018 22:38:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:53192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727626AbeIFCii (ORCPT ); Wed, 5 Sep 2018 22:38:38 -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 D10762083D; Wed, 5 Sep 2018 22:06:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536185187; bh=TnJCSUE3sWs3tmvkjVTwqa2/DVAK/9inqFKShdBs2Xw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BL6eU8QJppOxtyb3MkrIOqexcoaidARJVeG21ZDgENYE7xV6mj9KV0P5nMXawnNex f5TIm/o7Da0BaXHrzYYR4l0A1rp4yP3/bhGuRh4AT8UkiH78gAMStcYWw73TfjkXas fWAwHT8pgpQ9ONbw0RyYiRMGCf9An8+DU8a87MZQ= 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 35/77] perf stat: Add 'struct perf_stat_config' argument to perf_stat_synthesize_config() Date: Wed, 5 Sep 2018 19:03:58 -0300 Message-Id: <20180905220440.20256-36-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 Add a 'struct perf_stat_config' argument to perf_stat_synthesize_config(), so we could synthesize arbitrary config. 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-11-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-stat.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 0a358c2e1a93..d0d19a5ffa85 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -402,7 +402,8 @@ static void workload_exec_failed_signal(int signo __maybe_unused, siginfo_t *inf workload_exec_errno = info->si_value.sival_int; } -static int perf_stat_synthesize_config(bool attrs) +static int perf_stat_synthesize_config(struct perf_stat_config *config, + bool attrs) { int err; @@ -435,7 +436,7 @@ static int perf_stat_synthesize_config(bool attrs) return err; } - err = perf_event__synthesize_stat_config(NULL, &stat_config, + err = perf_event__synthesize_stat_config(NULL, config, process_synthesized_event, NULL); if (err < 0) { pr_err("Couldn't synthesize config.\n"); @@ -606,7 +607,7 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx) if (err < 0) return err; - err = perf_stat_synthesize_config(is_pipe); + err = perf_stat_synthesize_config(&stat_config, is_pipe); if (err < 0) return err; } -- 2.14.4