Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp76624imm; Fri, 10 Aug 2018 07:53:36 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyhywiEMSuY4PGtVL3RK/ecZM38f+fPldgUkzu71kIjMpmTwmrxiY0WDA/pp6bGaqeI4BLx X-Received: by 2002:a62:4f5b:: with SMTP id d88-v6mr7433529pfb.225.1533912816073; Fri, 10 Aug 2018 07:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533912816; cv=none; d=google.com; s=arc-20160816; b=qIK9leILiFaPiDPhaObzG8eaG21Jw6XFY+eWgC7yX1uuF73BVrVHtQ/FN8wZEFp7mZ 0v7vK755Jf1aWwTjLUIDKkycUuGv7HWw+cK/oTd0ZftGv35Ynnkir85TQVgc3pGRKS4i B8RMrhsqKtbvMbUOQ/v5S70C+7GiuY8v35RV4xixmg0woKYoPewuJ6fKZD8X6NW+cX3x C5ssBy6YK2U51cZIaMzp9FLLfM8i04nlz69ANtWJfNDplHQxUMuOpB9Sj/qGYqc6xf/o 12oFiRelLjzECj2JH2WNWpSohCjALicXaUVm+2G9Ue2PFx0fB/xmVsS1gXl+1jtrZsNJ BwPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=nx1A409lfGdeusyes5Z5OzF/df4zcNg+NLsUP9JfQNc=; b=UTFZlT4rWcqho1L1lu3rO9zjcbg6sDiqeMSL0wvRRC78v5d249ZBfghZeiZ6LXc3Vj 14bZbqdtNC97Q5il9gb5zUxV60yVgA+oaDZiMj999w3ib25JYyC1jGP42ozpqz2bR5Je MuW5wf7BRViwyz0DveEMR9D7vMqH70o3LG+sh+9xIvR17HjlvfbyBEI1ACCphEL+yI84 AewHEOZ5qECwzYVe1c+zyeqRElxVubcYSkniniBwwSZ2jCs+vo+TKD7oCcRpOmUYrjgf y6cpEffm82qGmTeV8L2T2a/DOsLHNLPlq4ZuKuOLaDlCHLgVHq9ESzGIr3c9JJM/BgEL MQpw== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q30-v6si9616767pgk.253.2018.08.10.07.53.21; Fri, 10 Aug 2018 07:53:36 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729230AbeHJQIG (ORCPT + 99 others); Fri, 10 Aug 2018 12:08:06 -0400 Received: from mga02.intel.com ([134.134.136.20]:32059 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728097AbeHJQIB (ORCPT ); Fri, 10 Aug 2018 12:08:01 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Aug 2018 06:38:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,219,1531810800"; d="scan'208";a="80633172" Received: from otc-lr-04.jf.intel.com ([10.54.39.114]) by orsmga001.jf.intel.com with ESMTP; 10 Aug 2018 06:38:01 -0700 From: kan.liang@linux.intel.com To: peterz@infradead.org, acme@kernel.org, tglx@linutronix.de, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: eranian@google.com, jolsa@redhat.com, namhyung@kernel.org, ak@linux.intel.com, Kan Liang Subject: [PATCH RFC 7/7] perf test: Add test case for PERF_SAMPLE_PAGE_SIZE Date: Fri, 10 Aug 2018 06:36:27 -0700 Message-Id: <1533908187-25204-7-git-send-email-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533908187-25204-1-git-send-email-kan.liang@linux.intel.com> References: <1533908187-25204-1-git-send-email-kan.liang@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kan Liang Extend sample-parsing test cases to support new sample type PERF_SAMPLE_PAGE_SIZE. Signed-off-by: Kan Liang --- tools/perf/tests/sample-parsing.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c index 0e2d00d..cfba33d 100644 --- a/tools/perf/tests/sample-parsing.c +++ b/tools/perf/tests/sample-parsing.c @@ -145,6 +145,9 @@ static bool samples_same(const struct perf_sample *s1, if (type & PERF_SAMPLE_PHYS_ADDR) COMP(phys_addr); + if (type & PERF_SAMPLE_PAGE_SIZE) + COMP(page_size); + return true; } @@ -210,7 +213,9 @@ static int do_test(u64 sample_type, u64 sample_regs, u64 read_format) .mask = sample_regs, .regs = regs, }, + .phys_addr = 113, + .page_size = PERF_MEM_PAGE_SIZE_4K, }; struct sample_read_value values[] = {{1, 5}, {9, 3}, {2, 7}, {6, 4},}; struct perf_sample sample_out; @@ -310,7 +315,7 @@ int test__sample_parsing(struct test *test __maybe_unused, int subtest __maybe_u * were added. Please actually update the test rather than just change * the condition below. */ - if (PERF_SAMPLE_MAX > PERF_SAMPLE_PHYS_ADDR << 1) { + if (PERF_SAMPLE_MAX > PERF_SAMPLE_PAGE_SIZE << 1) { pr_debug("sample format has changed, some new PERF_SAMPLE_ bit was introduced - test needs updating\n"); return -1; } -- 2.7.4