From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751348AbdFBUMw (ORCPT ); Fri, 2 Jun 2017 16:12:52 -0400 Received: from mga04.intel.com ([192.55.52.120]:20482 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751157AbdFBUMt (ORCPT ); Fri, 2 Jun 2017 16:12:49 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,286,1493708400"; d="scan'208";a="1137424090" From: Andi Kleen To: peterz@infradead.org, acme@kernel.org Cc: eranian@google.com, jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: [PATCH 5/6] perf, tools: Support persistent memory encoding Date: Fri, 2 Jun 2017 13:12:32 -0700 Message-Id: <20170602201233.19490-5-andi@firstfloor.org> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170602201233.19490-1-andi@firstfloor.org> References: <20170602201233.19490-1-andi@firstfloor.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andi Kleen Teach the perf user tools to report the recently added persistent memory encoding for sample data sources. Signed-off-by: Andi Kleen --- tools/include/uapi/linux/perf_event.h | 3 ++- tools/perf/util/mem-events.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h index 4b5deeada34b..8d2c7c4ec881 100644 --- a/tools/include/uapi/linux/perf_event.h +++ b/tools/include/uapi/linux/perf_event.h @@ -982,7 +982,8 @@ union perf_mem_data_src { #define PERF_MEM_LVLX_REMOTE 0x01 /* Remote */ #define PERF_MEM_LVLX_L4 0x02 /* L4 */ #define PERF_MEM_LVLX_RAM 0x04 /* Ram */ -/* 5 free */ +#define PERF_MEM_LVLX_PMEM 0x08 /* Persistent Memory */ +/* 4 free */ #define PERF_MEM_LVLX_SHIFT 33 diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c index 0ebce5be5724..97d39db8c0a5 100644 --- a/tools/perf/util/mem-events.c +++ b/tools/perf/util/mem-events.c @@ -170,6 +170,7 @@ static const char * const mem_lvlx[] = { NULL, "L4", "RAM", + "PMEM", }; int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info) -- 2.9.4