Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp900343ybl; Wed, 28 Aug 2019 06:59:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFWBvq3clbmRdCLHiJ1TZ9p6aQFwsp2RxWhHouCRUzCie/sYmZXLcE1MtJDoW1JzQKOJZ5 X-Received: by 2002:a17:90a:3082:: with SMTP id h2mr4446298pjb.53.1567000786222; Wed, 28 Aug 2019 06:59:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567000786; cv=none; d=google.com; s=arc-20160816; b=Xl179AaCCKzi09MOUqBxFtb4kFEP7EqBtvpHYaYlcO39kmLg7OYob0GofTLNJaWH0s cIiTCG7vNAJ2cH4ncIsWcErmPHWK3D9ZCPhsp9lofnvNuO6+4nXtdB/54usr8pBjqFPy FW08+2qySuTi+s4a2mNiBUbWLza8My/V4ykohH0oOjvhtQhUbTv/6Tn37XrqlSnONJSV AmKRolwiK4gu/Mm2pugcpF5aF5OktZ+3KBIloVbtXAFfu4PiegAb+b9ukcBIZG0Z87Rv sWwkiyJIO7RtGKcXUQgNU50gkkRHMXZr5sNe5YCV06Miagf0JS/kazJa0KujboCtXEw8 /C4w== 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=amzkK878EGec6vtMn9sab3Y5oh3wZmnL55BTMADONqI=; b=Wuz5ByqjcfEjMxwEaCwTekqD3Eu2hs6zUwECznXICHJepIx5Wf2FKuB3fyHRo0ZoeH 48WM9KRMTbaq7SyLGlRWXnRFryc+vzHiTSr+N2raES+qMKuICOaBxwbfNYtrLG90xSGz hJk033wTdJqO1lC5yH/y2AhniQkqmcqihLi85pJOGe7byqtA/cPXjg5X8mGYEzikvDbx G1bhABMuDOUcFBFKf8ZMdWqrlkDGB+n9j343t5YePmNcv9Yj0ep3V3Nk7dqDXwJQIb26 uzZMjo/1VV3TPQAYU2TWF5+aczEaKx4U+AA/e9dLTEmxFdFIj+iiseZRB1dRJ65Io4mF Ypug== 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 x126si2242856pgx.356.2019.08.28.06.59.30; Wed, 28 Aug 2019 06:59:46 -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 S1727101AbfH1N6L (ORCPT + 99 others); Wed, 28 Aug 2019 09:58:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42830 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726658AbfH1N6G (ORCPT ); Wed, 28 Aug 2019 09:58:06 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BAC5D3695F; Wed, 28 Aug 2019 13:58:05 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B87C1001B0B; Wed, 28 Aug 2019 13:58:03 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan Subject: [PATCH 21/23] libperf: Add 'union perf_event' to perf/event.h Date: Wed, 28 Aug 2019 15:57:15 +0200 Message-Id: <20190828135717.7245-22-jolsa@kernel.org> In-Reply-To: <20190828135717.7245-1-jolsa@kernel.org> References: <20190828135717.7245-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 28 Aug 2019 13:58:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org So it's available for libperf's users. Link: http://lkml.kernel.org/n/tip-2b9e9f0y7szdwtgnyua58b88@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/lib/include/perf/event.h | 36 +++++++++++++++++++++++++++++ tools/perf/util/event.h | 36 ----------------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index ef7a46e82a6d..a5b08ef118a7 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -323,4 +323,40 @@ struct compressed_event { char data[]; }; +union perf_event { + struct perf_event_header header; + struct perf_record_mmap mmap; + struct perf_record_mmap2 mmap2; + struct perf_record_comm comm; + struct perf_record_namespaces namespaces; + struct perf_record_fork fork; + struct perf_record_lost lost; + struct perf_record_lost_samples lost_samples; + struct perf_record_read read; + struct perf_record_throttle throttle; + struct perf_record_sample sample; + struct perf_record_bpf_event bpf; + struct perf_record_ksymbol ksymbol; + struct attr_event attr; + struct event_update_event event_update; + struct event_type_event event_type; + struct tracing_data_event tracing_data; + struct build_id_event build_id; + struct id_index_event id_index; + struct auxtrace_info_event auxtrace_info; + struct auxtrace_event auxtrace; + struct auxtrace_error_event auxtrace_error; + struct aux_event aux; + struct itrace_start_event itrace_start; + struct context_switch_event context_switch; + struct thread_map_event thread_map; + struct cpu_map_event cpu_map; + struct stat_config_event stat_config; + struct stat_event stat; + struct stat_round_event stat_round; + struct time_conv_event time_conv; + struct feature_event feat; + struct compressed_event pack; +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index ee2ee23e4c46..e15eed53ce90 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -337,42 +337,6 @@ enum { PERF_STAT_ROUND_TYPE__FINAL = 1, }; -union perf_event { - struct perf_event_header header; - struct perf_record_mmap mmap; - struct perf_record_mmap2 mmap2; - struct perf_record_comm comm; - struct perf_record_namespaces namespaces; - struct perf_record_fork fork; - struct perf_record_lost lost; - struct perf_record_lost_samples lost_samples; - struct perf_record_read read; - struct perf_record_throttle throttle; - struct perf_record_sample sample; - struct perf_record_bpf_event bpf; - struct perf_record_ksymbol ksymbol; - struct attr_event attr; - struct event_update_event event_update; - struct event_type_event event_type; - struct tracing_data_event tracing_data; - struct build_id_event build_id; - struct id_index_event id_index; - struct auxtrace_info_event auxtrace_info; - struct auxtrace_event auxtrace; - struct auxtrace_error_event auxtrace_error; - struct aux_event aux; - struct itrace_start_event itrace_start; - struct context_switch_event context_switch; - struct thread_map_event thread_map; - struct cpu_map_event cpu_map; - struct stat_config_event stat_config; - struct stat_event stat; - struct stat_round_event stat_round; - struct time_conv_event time_conv; - struct feature_event feat; - struct compressed_event pack; -}; - void perf_event__print_totals(void); struct perf_tool; -- 2.21.0