Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp899496ybl; Wed, 28 Aug 2019 06:59:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOEb/2hUIG/RPkqbenWEvhLXnlvlEsI6pRgUhz8FSMJUnl0xKwfCf5TkCHqU0lygy6NKOU X-Received: by 2002:a17:90a:c68c:: with SMTP id n12mr4422423pjt.33.1567000740650; Wed, 28 Aug 2019 06:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567000740; cv=none; d=google.com; s=arc-20160816; b=JjJa7Pg5SXhuxg5gU9kWwlyV99B4i6Y9HHA4rrnQoywgpoA9Fw5GmZjwJ20ikCLgaQ 2MzrNUDlYed38B5k/RQ2GBA4OnZ6bhRecs2IFToZBM9Ai9F6zxySva4Bk0mSqFL5Wgvc 0+gXA3emfcspDH6rrxYu/iAPb+x/voB/5AP+XWwzXkyC59JFwmxKeV420eTIKRYVbptD Nh7xqm22GYq/Mv/Q9ZFofqplerIsbj9TK8A1fJ478r/Semx2mqbQh6Bwe7cd45H0y0sq cHcN/hvFISyr0Ar1bXQqtkzfXEbdUZYxW+6bwnaUuq0+F4Ud5tdiGXDXTc/6YdB1VI4B 4sbg== 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=4yl1Wy6ukgi2a9mm7MfFtwQW7xdepN1I5UjHpIOVJeo=; b=RLx9Z8wPqRQgakK2zIfXL+Kf13woB/qosc5J03hmVwi0jeb9PTN+wB6572i3bNm2ZA QOkcQLwysUQx0B87CKTIlGEhupL7qmnAJgggf/GXOFwsyhcc/i+i40Qeg2lrBDdOC1X+ RU3hq9ME3Qeq+wo9iYRcWBJ1qsKfnrVM3mNHC3SfxrpBcCGxb+qx65uGt93stwom2Xas p2lpInalsezW1WRR0xY6YimYNAQQvQ+tZV/lp5RZH0N1eBq454Z4w+ALPX+gZicgA7wH jE4e5Ie+VGRtgpDG0eGC/439uMimmD2ewPkcCZ5oeJ8Lw6N/PM/CSRWzPVO/9L2JCwkS e+Pg== 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 e9si2530076pff.18.2019.08.28.06.58.44; Wed, 28 Aug 2019 06:59:00 -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 S1726909AbfH1N5l (ORCPT + 99 others); Wed, 28 Aug 2019 09:57:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3918 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726802AbfH1N5i (ORCPT ); Wed, 28 Aug 2019 09:57:38 -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 EB3E63C93; Wed, 28 Aug 2019 13:57:37 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4ED481001B08; Wed, 28 Aug 2019 13:57:36 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan Subject: [PATCH 09/23] libperf: Add PERF_RECORD_AUXTRACE 'struct auxtrace_event' to perf/event.h Date: Wed, 28 Aug 2019 15:57:03 +0200 Message-Id: <20190828135717.7245-10-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.29]); Wed, 28 Aug 2019 13:57:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move the PERF_RECORD_AUXTRACE event definition to libperf's event.h. In order to keep libperf simple, we switch 'u64/u32/u16/u8' types used events to their generic '__u*' versions. Link: http://lkml.kernel.org/n/tip-wrq43lrq47pqj0vhdqpgyanz@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/lib/include/perf/event.h | 11 +++++++++++ tools/perf/util/auxtrace.c | 2 +- tools/perf/util/event.h | 11 ----------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h index 02da73491451..78001c2973b6 100644 --- a/tools/perf/lib/include/perf/event.h +++ b/tools/perf/lib/include/perf/event.h @@ -208,4 +208,15 @@ struct auxtrace_info_event { __u64 priv[]; }; +struct auxtrace_event { + struct perf_event_header header; + __u64 size; + __u64 offset; + __u64 reference; + __u32 idx; + __u32 tid; + __u32 cpu; + __u32 reserved__; /* For alignment */ +}; + #endif /* __LIBPERF_EVENT_H */ diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index 12e9b7acbb2c..0d2ba1397e47 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -942,7 +942,7 @@ s64 perf_event__process_auxtrace(struct perf_session *session, s64 err; if (dump_trace) - fprintf(stdout, " size: %#"PRIx64" offset: %#"PRIx64" ref: %#"PRIx64" idx: %u tid: %d cpu: %d\n", + fprintf(stdout, " size: %#"PRI_lx64" offset: %#"PRI_lx64" ref: %#"PRI_lx64" idx: %u tid: %d cpu: %d\n", event->auxtrace.size, event->auxtrace.offset, event->auxtrace.reference, event->auxtrace.idx, event->auxtrace.tid, event->auxtrace.cpu); diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index ca2cae332c43..60895a3b2c85 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -332,17 +332,6 @@ struct events_stats { u32 nr_proc_map_timeout; }; -struct auxtrace_event { - struct perf_event_header header; - u64 size; - u64 offset; - u64 reference; - u32 idx; - u32 tid; - u32 cpu; - u32 reserved__; /* For alignment */ -}; - #define MAX_AUXTRACE_ERROR_MSG 64 struct auxtrace_error_event { -- 2.21.0