From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751826AbbE1CuN (ORCPT ); Wed, 27 May 2015 22:50:13 -0400 Received: from LGEMRELSE7Q.lge.com ([156.147.1.151]:37920 "EHLO lgemrelse7q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751588AbbE1CuM (ORCPT ); Wed, 27 May 2015 22:50:12 -0400 X-Original-SENDERIP: 10.177.220.203 X-Original-MAILFROM: namhyung@kernel.org From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern Subject: [RFC 0/2] perf session: Separate struct machines from session Date: Thu, 28 May 2015 11:39:02 +0900 Message-Id: <1432780744-8777-1-git-send-email-namhyung@kernel.org> X-Mailer: git-send-email 2.4.1 In-Reply-To: <20150519235813.GB22713@sejong> References: <20150519235813.GB22713@sejong> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnaldo, This is what I have now for the earlier discussion [1]. I just used machines__new/delete functions directly whenever a session is created/deleted. As it touches many callsites, and it needs bit more caring about the error path, you may want to split the first patch for each command. In any case, pleaes let me know what do you think. Note that this patchset bases on my (slightely modified) previous multi-thread patchset so will not be applied to the current perf/core. I'll rebase and send out after we conclude how to deal with it. Thanks, Namhyung [1] https://lkml.org/lkml/2015/5/19/1062 Namhyung Kim (2): perf tools: Introduce machines__new/delete() perf session: Separate struct machines from session tools/perf/builtin-annotate.c | 7 ++++++- tools/perf/builtin-buildid-cache.c | 14 ++++++++++++-- tools/perf/builtin-buildid-list.c | 16 +++++++++++++--- tools/perf/builtin-diff.c | 16 ++++++++++++++-- tools/perf/builtin-evlist.c | 18 +++++++++++++++--- tools/perf/builtin-inject.c | 5 +++++ tools/perf/builtin-kmem.c | 14 +++++++++----- tools/perf/builtin-kvm.c | 14 +++++++++++++- tools/perf/builtin-lock.c | 7 ++++++- tools/perf/builtin-mem.c | 12 +++++++++--- tools/perf/builtin-record.c | 14 ++++++++++---- tools/perf/builtin-report.c | 13 ++++++++++--- tools/perf/builtin-sched.c | 8 +++++++- tools/perf/builtin-script.c | 32 ++++++++++++++++++++++++-------- tools/perf/builtin-timechart.c | 12 +++++++++--- tools/perf/builtin-top.c | 23 ++++++++++++++++------- tools/perf/builtin-trace.c | 10 ++++++++-- tools/perf/util/build-id.c | 16 ++++++++-------- tools/perf/util/data-convert-bt.c | 8 +++++++- tools/perf/util/intel-bts.c | 2 +- tools/perf/util/intel-pt.c | 2 +- tools/perf/util/machine.c | 15 +++++++++++++++ tools/perf/util/machine.h | 3 +++ tools/perf/util/session.c | 30 +++++++++++++++--------------- tools/perf/util/session.h | 6 +++--- tools/perf/util/tool.h | 2 ++ 26 files changed, 241 insertions(+), 78 deletions(-) -- 2.4.1