Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp603318ybz; Wed, 29 Apr 2020 06:13:09 -0700 (PDT) X-Google-Smtp-Source: APiQypLXAaSoP1KyzWk+eBOvBAE6ivk5n4glizFLh25CMbdyNmAD1FVqRwAvsn6V3jojgFoZwKJr X-Received: by 2002:a17:906:7804:: with SMTP id u4mr2554450ejm.328.1588165989135; Wed, 29 Apr 2020 06:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588165989; cv=none; d=google.com; s=arc-20160816; b=Ml8pdms0bsB3cliNKjKha0om0ZqIpNcHwmy4hVvofLuytr8byhJaKWqqPe0/t2BK0N yFHPgG3hSBXQv8gykQwMeSpPIAalQalVVSfIY4+CBv27AOWKv7baVb7VCubx9o77oAc/ s00ryA6xoK5Ol9RENXMvD15SU91gfnL7pNcJFJa+BCTeKbG2sQ9Hn6Xt0IxJDP6Hi2UM 4Dc36lOxKPOkc0UDwHFUICKGoutedQS8/JabE3MURdYzJbXi9C1t9xW5SloVgnKLDzf3 I9L9oLrkhOH/FSDeXf8OOXROWaSYPO2S8Zi7pgDuFdRrr/LlsaEcF+FDB996Bm0Vn2dY Gd2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=k+proQJ9dVJlGlNW8Gmmw8I9sgp0rlNurQv/0HEI1JY=; b=zIXyg1F21FUBTok7o1Txr2vtGreSGVlHKtG89Y5Un8xppfSv9AbCzuMAK1EVDj68H4 ULmKw9iclwcuy58Mwqta8lU3ePsCR6aECcn2eHBC62/tNlzX6253IYqZy5oldBtI0M7m Pm/A6aK66AtGZElmJpjLxqBFAogv25kg5rRK3QExihn4iUgRGeKynY5fthBwt+1cSpMS SKKFhyDiP9+agm81SS1p5up+XD3p+tRvIzUgr6aDhKdkhPmkLnvA5HFjo7faHzCWkdG5 Qt2nIjX422AGtcoQX8+273C0sW2wcC+J2bZSJ4rs4U26Cz2g/375z0wk+pss7cTQhZzg oowg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=I4EPzugv; 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 c16si2943413edw.172.2020.04.29.06.12.44; Wed, 29 Apr 2020 06:13:09 -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=default header.b=I4EPzugv; 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 S1726941AbgD2NLR (ORCPT + 99 others); Wed, 29 Apr 2020 09:11:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:47650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726617AbgD2NLQ (ORCPT ); Wed, 29 Apr 2020 09:11:16 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (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 D16CA221EC; Wed, 29 Apr 2020 13:11:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588165876; bh=wTKfMv1L2Q06PbZw4nQc40uhrGNOSNkVDDoDn5nXFQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I4EPzugvtr3/SIsY7UbLSElKB1Z9TgrhIV4IVmcKCipXDQfHFZfs2K8om5WFNa+bT mDauxE7cPLv2MrmjZBgtWit+pQNNhGguS0NTKDMsKU/VKYSQovuqZAdZbJDA5l0Ema Yy6kY7YN0buIdeWnigiWYOGwS4P/YGzwn8HrhzP8= From: Arnaldo Carvalho de Melo To: Jiri Olsa , Namhyung Kim Cc: Ingo Molnar , Thomas Gleixner , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo , Adrian Hunter , Song Liu Subject: [PATCH 1/8] perf record: Move sb_evlist to 'struct record' Date: Wed, 29 Apr 2020 10:10:59 -0300 Message-Id: <20200429131106.27974-2-acme@kernel.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200429131106.27974-1-acme@kernel.org> References: <20200429131106.27974-1-acme@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnaldo Carvalho de Melo Where state related to a 'perf record' session is grouped. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Song Liu Link: http://lore.kernel.org/lkml/20200427211935.25789-2-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-record.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 2e8011f179f2..2348c4205e59 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -86,6 +86,7 @@ struct record { struct auxtrace_record *itr; struct evlist *evlist; struct perf_session *session; + struct evlist *sb_evlist; int realtime_prio; bool no_buildid; bool no_buildid_set; @@ -1446,7 +1447,6 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) struct perf_data *data = &rec->data; struct perf_session *session; bool disabled = false, draining = false; - struct evlist *sb_evlist = NULL; int fd; float ratio = 0; @@ -1581,9 +1581,9 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) } if (!opts->no_bpf_event) - bpf_event__add_sb_event(&sb_evlist, &session->header.env); + bpf_event__add_sb_event(&rec->sb_evlist, &session->header.env); - if (perf_evlist__start_sb_thread(sb_evlist, &rec->opts.target)) { + if (perf_evlist__start_sb_thread(rec->sb_evlist, &rec->opts.target)) { pr_debug("Couldn't start the BPF side band thread:\nBPF programs starting from now on won't be annotatable\n"); opts->no_bpf_event = true; } @@ -1857,7 +1857,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) perf_session__delete(session); if (!opts->no_bpf_event) - perf_evlist__stop_sb_thread(sb_evlist); + perf_evlist__stop_sb_thread(rec->sb_evlist); return status; } -- 2.21.1