Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5877235ybi; Sun, 21 Jul 2019 04:30:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8biyL5HGuM3zUcZ4iFZdfPOmRoabxMsLQZya8l1NdIl6v5ZgGkNHI+GHprPmJjgP4oppJ X-Received: by 2002:a17:90a:7788:: with SMTP id v8mr41204483pjk.132.1563708629458; Sun, 21 Jul 2019 04:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563708629; cv=none; d=google.com; s=arc-20160816; b=tlIDHoufAY4tYQjhXvly86k5szPnHY+CJ6c+zmvpC3QBKQS0077MuIVEh10m11Wb/a x9y+C54WQOdkbhjEtG54391lJ7XPYKoTCeAB/2K2dwEkHc+ARFwqCvEzVw2nz2sGY00q 0ERBnXEwFyADDDtmIi25M2SR2KP9gvv1qqC3b7BxauJ066pys1qi13cTOrf3461/in47 eRTX8DVCvNG/PK3OAjO38l8cof2I+zXKTn68MI2hSRJVwyBs/6/1xLWDW/wKcYxdc1+y YJfpL4w6BR1JHMBfEbfro8BC551X0rBiFaj5qyZ0SJRo1sYNEcK7EbaQeBogoeCE9Mpr vKsA== 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; bh=qXfFlj3kki5yL/s9szptwBn1MKrYIza+PyW4mIpOYsA=; b=Kr9JM6P96F45Htcnko/ABYbFleQM2Gg0f3koX6XJtYDh9PvTT3F0kQeb+tHcCA6TA/ lfBMZFiEnG5yWmcGmnkr62y1Facx0EGjND0W0TqX4M4wtOqbn+8fsD6BdiIcicybgZsn l8Oyn0pEO6ul5kBjbTUdeEvDXJSep1ZpaVJGlIsRn9VVBQYJIS+wN+efIPNaqNRDd1UC JqjOGmIAo3860xZcr9+QaW9J5WvVKy1xNJQjDtg6HjJe7DkVcY6GdJBXVB4AdJqQAAet Q5RKnIBI6ovP1CUWmjTqFeGjL6M/yhYRTGLrlc0nlnuqtbDcMAZJoTjHeyOuQmJmVWof BXbA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 x32si5808897pld.252.2019.07.21.04.30.13; Sun, 21 Jul 2019 04:30:29 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726581AbfGUL3O (ORCPT + 99 others); Sun, 21 Jul 2019 07:29:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38618 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726262AbfGUL3O (ORCPT ); Sun, 21 Jul 2019 07:29:14 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EE212308AA11; Sun, 21 Jul 2019 11:29:13 +0000 (UTC) Received: from krava.redhat.com (ovpn-204-23.brq.redhat.com [10.40.204.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id 30D885D9D3; Sun, 21 Jul 2019 11:29:06 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Andi Kleen , Alexey Budankov , Michael Petlan Subject: [PATCH 34/79] libperf: Add perf_evlist and perf_evsel structs Date: Sun, 21 Jul 2019 13:24:21 +0200 Message-Id: <20190721112506.12306-35-jolsa@kernel.org> In-Reply-To: <20190721112506.12306-1-jolsa@kernel.org> References: <20190721112506.12306-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Sun, 21 Jul 2019 11:29:14 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding perf_evlist and perf_evsel structs into libperf. It's added as a declarations into into: include/perf/evlist.h include/perf/evsel.h which will be included by users. The definitions are added into: include/internal/evlist.h include/internal/evsel.h which is not to be included by users, but shared within perf and libperf. Link: http://lkml.kernel.org/n/tip-2f3px8ns5vq5075l0sv3dc02@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/lib/Build | 2 ++ tools/perf/lib/evlist.c | 4 ++++ tools/perf/lib/evsel.c | 4 ++++ tools/perf/lib/include/internal/evlist.h | 9 +++++++++ tools/perf/lib/include/internal/evsel.h | 9 +++++++++ tools/perf/lib/include/perf/evlist.h | 7 +++++++ tools/perf/lib/include/perf/evsel.h | 7 +++++++ 7 files changed, 42 insertions(+) create mode 100644 tools/perf/lib/evlist.c create mode 100644 tools/perf/lib/evsel.c create mode 100644 tools/perf/lib/include/internal/evlist.h create mode 100644 tools/perf/lib/include/internal/evsel.h create mode 100644 tools/perf/lib/include/perf/evlist.h create mode 100644 tools/perf/lib/include/perf/evsel.h diff --git a/tools/perf/lib/Build b/tools/perf/lib/Build index 9beadfc81a71..b27c1543b046 100644 --- a/tools/perf/lib/Build +++ b/tools/perf/lib/Build @@ -1,3 +1,5 @@ libperf-y += core.o libperf-y += cpumap.o libperf-y += threadmap.o +libperf-y += evsel.o +libperf-y += evlist.o diff --git a/tools/perf/lib/evlist.c b/tools/perf/lib/evlist.c new file mode 100644 index 000000000000..646bdd518793 --- /dev/null +++ b/tools/perf/lib/evlist.c @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 +#include +#include +#include diff --git a/tools/perf/lib/evsel.c b/tools/perf/lib/evsel.c new file mode 100644 index 000000000000..12e86de1994b --- /dev/null +++ b/tools/perf/lib/evsel.c @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 +#include +#include +#include diff --git a/tools/perf/lib/include/internal/evlist.h b/tools/perf/lib/include/internal/evlist.h new file mode 100644 index 000000000000..7fbfe5716652 --- /dev/null +++ b/tools/perf/lib/include/internal/evlist.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __LIBPERF_INTERNAL_EVLIST_H +#define __LIBPERF_INTERNAL_EVLIST_H + +struct perf_evlist { + struct list_head entries; +}; + +#endif /* __LIBPERF_INTERNAL_EVLIST_H */ diff --git a/tools/perf/lib/include/internal/evsel.h b/tools/perf/lib/include/internal/evsel.h new file mode 100644 index 000000000000..690943d0408a --- /dev/null +++ b/tools/perf/lib/include/internal/evsel.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __LIBPERF_INTERNAL_EVSEL_H +#define __LIBPERF_INTERNAL_EVSEL_H + +struct perf_evsel { + struct list_head node; +}; + +#endif /* __LIBPERF_INTERNAL_EVSEL_H */ diff --git a/tools/perf/lib/include/perf/evlist.h b/tools/perf/lib/include/perf/evlist.h new file mode 100644 index 000000000000..92b0eb39caec --- /dev/null +++ b/tools/perf/lib/include/perf/evlist.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __LIBPERF_EVLIST_H +#define __LIBPERF_EVLIST_H + +struct perf_evlist; + +#endif /* __LIBPERF_EVLIST_H */ diff --git a/tools/perf/lib/include/perf/evsel.h b/tools/perf/lib/include/perf/evsel.h new file mode 100644 index 000000000000..162bffd43409 --- /dev/null +++ b/tools/perf/lib/include/perf/evsel.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __LIBPERF_EVSEL_H +#define __LIBPERF_EVSEL_H + +struct perf_evsel; + +#endif /* __LIBPERF_EVSEL_H */ -- 2.21.0