Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4996022ybi; Tue, 30 Jul 2019 11:51:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAuzZQkCvneGOv3LxzwR+BHzHyiMRF1yTT1KbP8wHN4H/YzRb9ZO5xiXqvnZFk6rOmZZ29 X-Received: by 2002:a17:90a:1b48:: with SMTP id q66mr113493112pjq.83.1564512670524; Tue, 30 Jul 2019 11:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564512670; cv=none; d=google.com; s=arc-20160816; b=pRXSc+/4ydvkrxi6eXcXf8VvlgdaD5b5W6sUf3Y/kG78z5v2SYTBop+8+jfN1UUHcQ 1i/0xQDFBc5lI3aHqCXuq50+s+8eVA0igM2DWeR6Y3uqLqRuD9Ler1b8gErkbRwY83k7 5eBNoy6pZqRFK5iwlhsQtNvgo8k6qOOx3eNvr84lweJu+4IZdhhHbFMXyALg2Imhr9y/ H4NFse6UXCWQSMaPf0f9Y3+AlMCMMKnHUd8l2ervXIr9LlE66sO2+99hGxOKN8CfSie2 2os3lY576tp1O6oeQIyHr9XuL8yJaPh/LqhlKB8X7zkAWGNV7D+WbN2bi3P9BHWni94M lz7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=WXjuyk2IY+kTbglEz6/IJipMdwmqlisUECfmvP6aZLM=; b=b2jqWE83peoT34pVifZfN4LcyRokYvr4t+cBtj2VHxvW3MwMglUBRiN0h8JggZPzjH 2DO2zopSJazPz9IeGbMtxQTp/5bkaUVip2l8d2crf2ZV62+5jreLOfCxnyYlcbNxGffd THo94SlBbbipKSZOaKwf/s6A05eYo4HhMlCyBVMp+eu3hhjbtG6SXITlVfMcZe8nLpBa 5V58i1qAslrg1GzBWOTxRqIC6h0e6fsq1FvXe1ZqkR+ZXQqvSXVw/aEi4A/l1CK0MTNU JPZuaKcAqQjpHtc6SdyGVuUFCYfO0qmoCZULOKFGoPfBKfsdsaG02Rl35k1sHLfp4cKp dscA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019071901 header.b=S2RikUcX; 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=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f20si32908231pfn.166.2019.07.30.11.50.54; Tue, 30 Jul 2019 11:51:10 -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=@zytor.com header.s=2019071901 header.b=S2RikUcX; 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=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388066AbfG3SuK (ORCPT + 99 others); Tue, 30 Jul 2019 14:50:10 -0400 Received: from terminus.zytor.com ([198.137.202.136]:39887 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388418AbfG3SuK (ORCPT ); Tue, 30 Jul 2019 14:50:10 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x6UInwsJ3335515 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 30 Jul 2019 11:49:58 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x6UInwsJ3335515 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019071901; t=1564512599; bh=WXjuyk2IY+kTbglEz6/IJipMdwmqlisUECfmvP6aZLM=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=S2RikUcXsOn1cdXjtPqslFaLxJbS52ibV9tTnvsIXs1OArwJBM8ri9seSqJ796uHS SY3JOzf6/DmMSHR09t567pJcgm/NtISNkvmbSdQJJyBUtGzkn5ZZiH8e9a35b9frqB Djb4zlpA6A3YrDpEl6JZwo77k9krTHR7pERoAzH7Ne3RS+9bI+EuskhbaALrplXolj UfC0VNWt8X1sXKAaBEaPXboxva5NYAovfMP1WSz4wtqS+WfuEKLHHaBCGsVtlHN8Pc swYZ58qBGMWErZkyb7L9w4V3yb0JFVlfRxRtEWZbKuMDQXB4z7swGxOiFPbrOha9ky 3f28CHn3y5bGQ== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x6UInupF3335511; Tue, 30 Jul 2019 11:49:56 -0700 Date: Tue, 30 Jul 2019 11:49:56 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Jiri Olsa Message-ID: Cc: linux-kernel@vger.kernel.org, alexey.budankov@linux.intel.com, namhyung@kernel.org, mpetlan@redhat.com, mingo@kernel.org, tglx@linutronix.de, alexander.shishkin@linux.intel.com, jolsa@kernel.org, acme@redhat.com, ak@linux.intel.com, peterz@infradead.org, hpa@zytor.com Reply-To: linux-kernel@vger.kernel.org, alexey.budankov@linux.intel.com, namhyung@kernel.org, mpetlan@redhat.com, mingo@kernel.org, alexander.shishkin@linux.intel.com, tglx@linutronix.de, acme@redhat.com, jolsa@kernel.org, peterz@infradead.org, ak@linux.intel.com, hpa@zytor.com In-Reply-To: <20190721112506.12306-58-jolsa@kernel.org> References: <20190721112506.12306-58-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] libperf: Adopt xyarray class from perf Git-Commit-ID: 4b247fa7314ce48282f3da400a9ffb7f3fd3f863 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 4b247fa7314ce48282f3da400a9ffb7f3fd3f863 Gitweb: https://git.kernel.org/tip/4b247fa7314ce48282f3da400a9ffb7f3fd3f863 Author: Jiri Olsa AuthorDate: Sun, 21 Jul 2019 13:24:44 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 29 Jul 2019 18:34:45 -0300 libperf: Adopt xyarray class from perf Move the xyarray class from perf to libperf, because it's going to be used in both. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20190721112506.12306-58-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-top.c | 1 - tools/perf/lib/Build | 1 + tools/perf/{util => lib/include/internal}/xyarray.h | 6 +++--- tools/perf/{util => lib}/xyarray.c | 4 ++-- tools/perf/util/Build | 1 - tools/perf/util/counts.h | 2 +- tools/perf/util/evsel.h | 2 +- tools/perf/util/python-ext-sources | 1 - tools/perf/util/stat.h | 1 - 9 files changed, 8 insertions(+), 11 deletions(-) diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index c69ddc67c672..1a4615a5f6c9 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -38,7 +38,6 @@ #include #include "util/parse-events.h" #include "util/cpumap.h" -#include "util/xyarray.h" #include "util/sort.h" #include "util/string2.h" #include "util/term.h" diff --git a/tools/perf/lib/Build b/tools/perf/lib/Build index faf64db13e37..4f78ec0b4e10 100644 --- a/tools/perf/lib/Build +++ b/tools/perf/lib/Build @@ -4,6 +4,7 @@ libperf-y += threadmap.o libperf-y += evsel.o libperf-y += evlist.o libperf-y += zalloc.o +libperf-y += xyarray.o $(OUTPUT)zalloc.o: ../../lib/zalloc.c FORCE $(call rule_mkdir) diff --git a/tools/perf/util/xyarray.h b/tools/perf/lib/include/internal/xyarray.h similarity index 84% rename from tools/perf/util/xyarray.h rename to tools/perf/lib/include/internal/xyarray.h index 7ffe562e7ae7..3bf70e4d474c 100644 --- a/tools/perf/util/xyarray.h +++ b/tools/perf/lib/include/internal/xyarray.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _PERF_XYARRAY_H_ -#define _PERF_XYARRAY_H_ 1 +#ifndef __LIBPERF_INTERNAL_XYARRAY_H +#define __LIBPERF_INTERNAL_XYARRAY_H #include @@ -32,4 +32,4 @@ static inline int xyarray__max_x(struct xyarray *xy) return xy->max_x; } -#endif /* _PERF_XYARRAY_H_ */ +#endif /* __LIBPERF_INTERNAL_XYARRAY_H */ diff --git a/tools/perf/util/xyarray.c b/tools/perf/lib/xyarray.c similarity index 95% copy from tools/perf/util/xyarray.c copy to tools/perf/lib/xyarray.c index 86889ebc3514..dcd901d154bb 100644 --- a/tools/perf/util/xyarray.c +++ b/tools/perf/lib/xyarray.c @@ -1,8 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 -#include "xyarray.h" +#include +#include #include #include -#include struct xyarray *xyarray__new(int xlen, int ylen, size_t entry_size) { diff --git a/tools/perf/util/Build b/tools/perf/util/Build index 08f670d21615..7abf05131889 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -69,7 +69,6 @@ perf-y += svghelper.o perf-y += sort.o perf-y += hist.o perf-y += util.o -perf-y += xyarray.o perf-y += cpumap.o perf-y += cputopo.o perf-y += cgroup.o diff --git a/tools/perf/util/counts.h b/tools/perf/util/counts.h index 0f0cb2d8f70d..bbfac9ecf642 100644 --- a/tools/perf/util/counts.h +++ b/tools/perf/util/counts.h @@ -2,7 +2,7 @@ #ifndef __PERF_COUNTS_H #define __PERF_COUNTS_H -#include "xyarray.h" +#include struct perf_counts_values { union { diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index 57b5523b480c..1f9f66fe43f4 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -8,7 +8,7 @@ #include #include #include -#include "xyarray.h" +#include #include "symbol_conf.h" #include "cpumap.h" #include "counts.h" diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources index 2237bac9fadb..235bd9803390 100644 --- a/tools/perf/util/python-ext-sources +++ b/tools/perf/util/python-ext-sources @@ -20,7 +20,6 @@ util/namespaces.c ../lib/vsprintf.c util/thread_map.c util/util.c -util/xyarray.c util/cgroup.c util/parse-branch-options.c util/rblist.c diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h index 95b4de7a9d51..bcb376e1b3a7 100644 --- a/tools/perf/util/stat.h +++ b/tools/perf/util/stat.h @@ -8,7 +8,6 @@ #include #include #include -#include "xyarray.h" #include "rblist.h" #include "perf.h" #include "event.h"