Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4920352ybg; Mon, 21 Oct 2019 17:06:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/xkWCOpRN2Kr4faKY1RTpvMhmn8jjDpptu31pdLgdtxFPP1k1AtIi1DrfWML/2MV/OLs+ X-Received: by 2002:a17:906:7f94:: with SMTP id f20mr1021810ejr.333.1571702768360; Mon, 21 Oct 2019 17:06:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571702768; cv=none; d=google.com; s=arc-20160816; b=WXLjW8WQkl1c8aMNRGEKZiHSZOnH/dN4K80tcYzoMxzdT5xxUS3RaveOf5TqD0GY1k rnA0iuuGIndOs7lQoIJfwvO+XJAHKLTfLZopqezmJEonrjcdFFIoOsqPKhX2HXKqUkUp lEMI1GTC7XwJE5CtwM1SNe+p9aBH2sd2BKJbo7TRT87mFqHr3GQca/cM2FwjscpJ0NPF yhdNW3Q7V04pXUVfD94LL1I84/8w7B7IlqSP+9elpEdpw5TbTyNGm+8lqliluwZs6Bdv Dnx2GOmOyGaE0o7S1anGg1fyzfjtT5huC3FuCJaNZ5cxgiRo0ggt5sw/LCWkcaCp66RY Jn2g== 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 :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=xqAsbQfYBVJNtQ9Sazwt1BkoUNoAYmPv3FLXputKoAQ=; b=MNOKx3qfUSCg/sWAHv1dM5cIuiq/pIWT0GDWhvZ/Nfc2AhxDuz+CQUImprsIL97LqG B7Pq3ns1qgZF4ParU1yxv2uavWVycOMOV7hulaHGL5aM7Zy0MRAkAYZIkqMV/RMjjn8K CjX8SxXV5mpUNmb16c2nlzRUQ7eHOYuWMKg6dTH+Xg4yia5gZdQA3MbqPq83LYeo5U5A +WGzhEPUR29sEGqzHqBgp5rYKAjVlW2hIlyFt75XZNZOLl3XcWXeFCyXeTjJDtRoS4to sNbkv6ZFvP+hGi/t9ilfMGB1Fpuy7p7xA5Jy+FmSG1w0H9+X29FPoT1Ar5NDYh9UaTjF 8wyA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h90si11283583edd.178.2019.10.21.17.05.45; Mon, 21 Oct 2019 17:06:08 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730812AbfJVAEw (ORCPT + 99 others); Mon, 21 Oct 2019 20:04:52 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:38895 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730730AbfJVAEv (ORCPT ); Mon, 21 Oct 2019 20:04:51 -0400 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iMgwy-0003vi-9L; Tue, 22 Oct 2019 01:18:56 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 73CCC1C047B; Tue, 22 Oct 2019 01:18:55 +0200 (CEST) Date: Mon, 21 Oct 2019 23:18:54 -0000 From: "tip-bot2 for Leo Yan" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf tests bp_account: Add dedicated checking helper is_supported() Cc: Leo Yan , Adrian Hunter , Alexander Shishkin , Brajeswar Ghosh , Florian Fainelli , Jiri Olsa , Mark Rutland , Michael Petlan , Namhyung Kim , Peter Zijlstra , Song Liu , Souptick Joarder , Will Deacon , Arnaldo Carvalho de Melo , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org In-Reply-To: <20191018085531.6348-2-leo.yan@linaro.org> References: <20191018085531.6348-2-leo.yan@linaro.org> MIME-Version: 1.0 Message-ID: <157169993489.29376.15623628756764296019.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the perf/core branch of tip: Commit-ID: e533eadf6596451880f518949cbb964dbd6189ae Gitweb: https://git.kernel.org/tip/e533eadf6596451880f518949cbb964dbd6189ae Author: Leo Yan AuthorDate: Fri, 18 Oct 2019 16:55:30 +08:00 Committer: Arnaldo Carvalho de Melo CommitterDate: Sat, 19 Oct 2019 15:35:01 -03:00 perf tests bp_account: Add dedicated checking helper is_supported() The arm architecture supports breakpoint accounting but it doesn't support breakpoint overflow signal handling. The current code uses the same checking helper, thus it disables both testings (bp_account and bp_signal) for arm platform. For handling two testings separately, this patch adds a dedicated checking helper is_supported() for breakpoint accounting testing, thus it allows supporting breakpoint accounting testing on arm platform; the old helper test__bp_signal_is_supported() is only used to checking for breakpoint overflow signal testing. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Brajeswar Ghosh Cc: Florian Fainelli Cc: Jiri Olsa Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Souptick Joarder Cc: Will Deacon Link: http://lore.kernel.org/lkml/20191018085531.6348-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/bp_account.c | 16 ++++++++++++++++ tools/perf/tests/builtin-test.c | 2 +- tools/perf/tests/tests.h | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/tools/perf/tests/bp_account.c b/tools/perf/tests/bp_account.c index 52ff7a4..d0b9353 100644 --- a/tools/perf/tests/bp_account.c +++ b/tools/perf/tests/bp_account.c @@ -188,3 +188,19 @@ int test__bp_accounting(struct test *test __maybe_unused, int subtest __maybe_un return bp_accounting(wp_cnt, share); } + +bool test__bp_account_is_supported(void) +{ + /* + * PowerPC and S390 do not support creation of instruction + * breakpoints using the perf_event interface. + * + * Just disable the test for these architectures until these + * issues are resolved. + */ +#if defined(__powerpc__) || defined(__s390x__) + return false; +#else + return true; +#endif +} diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 55774ba..8b286e9 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -121,7 +121,7 @@ static struct test generic_tests[] = { { .desc = "Breakpoint accounting", .func = test__bp_accounting, - .is_supported = test__bp_signal_is_supported, + .is_supported = test__bp_account_is_supported, }, { .desc = "Watchpoint", diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h index 72912eb..9837b6e 100644 --- a/tools/perf/tests/tests.h +++ b/tools/perf/tests/tests.h @@ -111,6 +111,7 @@ int test__map_groups__merge_in(struct test *t, int subtest); int test__time_utils(struct test *t, int subtest); bool test__bp_signal_is_supported(void); +bool test__bp_account_is_supported(void); bool test__wp_is_supported(void); #if defined(__arm__) || defined(__aarch64__)