Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1761934ybg; Sat, 19 Oct 2019 02:00:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAL0xhypW1XL45Meju2Ja5eLDB4J0SkeiRekwul4PRIj4yXQEfltLwD/3eqMwcHn/g1GrP X-Received: by 2002:a17:906:3016:: with SMTP id 22mr12167823ejz.227.1571475612836; Sat, 19 Oct 2019 02:00:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571475612; cv=none; d=google.com; s=arc-20160816; b=AZr9TowJysKwN0CkNdTV38OoPeVOlRiPK8fMu/0v7u1vNQ8klAW5bKcHCPqalB+cbP xtBKhXCDB0e/uE70Fmap4hen8LZdDSdxCftA4K2t8r3/CwkOuxxtFQNXiADO1BcB6qc8 fnmHbDtR7uVFuu87tqRKmtOcpEvbipHxHgIMAtTfOOdyA1JnOgPrU8X6FgOnzFiSk1eS +6Q6dGZ3ZJiizBv23dbTNDtIGRzWli38KaIIeHH8kQYuckJfeSqPgSPxitsjRb9UiIhV 0ilHFd9+J/YOlX+8McpO0zhcrzqcPYKvWeICJNUBcQ5p6GES29EEtNgxy2JIR+Xh1fz6 T3NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=uJ2aFB6nVgWsoMS8qT6A8NRFs/E7OehjCvE9nzqVpn0=; b=iDKRS8tfrEd2qzW/t4A1+22vyLxXOIPHiDY8fDAh9sfB0806Cd5tuXOalBMdQnz2ey +wOg9QSI0WFYvHoz4doKrqQ+MDdHv05kbUBkGTjCwH7YRj8KwYo0bVXj/qbXV3GAwSVE huakoaq9+F40FLlYISFyjN3aiKraISqFqlYyC8ajNI6uHe9bgpoxTkWoL9mBj0ga2u5/ XCuBmZDpEpShRtplGb3cd/Zp+yE+EGbO/hiiJvfhqDwHPfGhUnpAn6yzR3FNUFc4UQmC C8Pcwiwu/ylsUks3GoP0Yj4dxJ2CjRvHBvuh0ZMNFgOS0FednicW3JH4eYXAZh3vOxB4 1nyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KnAsK8+L; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oz25si4607174ejb.175.2019.10.19.01.59.48; Sat, 19 Oct 2019 02:00:12 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KnAsK8+L; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505619AbfJRR5b (ORCPT + 99 others); Fri, 18 Oct 2019 13:57:31 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:37353 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505601AbfJRR5a (ORCPT ); Fri, 18 Oct 2019 13:57:30 -0400 Received: by mail-qk1-f194.google.com with SMTP id u184so6102479qkd.4 for ; Fri, 18 Oct 2019 10:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uJ2aFB6nVgWsoMS8qT6A8NRFs/E7OehjCvE9nzqVpn0=; b=KnAsK8+LQL8CZjLc5R3KZZTsYexKm3LyXuyrgL2GqbwBRHUoOY6CfuL8TFrxV7eg01 u6K+KTxvJ7jNLQXxXDcyHKcUUsRAaLK/mODY5Tr1fZae1Jb9m3qVF+y/XazGbWzDathb vS8ZlVm2JuMOxqL2wqnhvpmify/9ct3piH45dMTUwcxSybklOL+NdzRKwveLpNcYB60S s/G4LAWmIDd8V8dGVKQovot5aM/GKLv/PY8XvY2jrOwmQv7x9hEvvMAK9KISXPI/K8kR KTlsme/nTsOsyupcZ1G/+KW0Vg8XqZ9CuAOKws3j9s+n3bQXwwgooTA4Z0ATX1/rF8Iw xvEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uJ2aFB6nVgWsoMS8qT6A8NRFs/E7OehjCvE9nzqVpn0=; b=KPBAo4MYLSOkFvxjK3PNHxDK8GhpvoL4FDwlBfnUwdqJgO8UjeVioL1dvmTWYMrl+/ 1lSo532UMSpmyPpoE4q+bm+2+CdG8YP3dw8kR5yQPupRT0YxnMPgLxCm6ZRAr7HxLE++ G0iuHYOkTfcZppiAMmwpYF98V+940xLpZsorW685KS4WnfUY0HvMX6d9hVWT9Tg62xzN r7jXWzm2aDhtYUXs3up1PAzYKyfjLAllY9cA+VyfXEM/4of1pYPkOhNd73EbuejTk571 nF/qkfZkCduXwS+Pk1CtDjPUpcKPE3Oj1wUbph6fsVxLP3omcR2p9K0b9e/OvcERr/23 FufA== X-Gm-Message-State: APjAAAVUndyfzkzEgzBn0DP9oEBcAd6z28ZThzCrins6MeM7jn3B4aBJ 22htLFNZYmah1Byx+j+vphg= X-Received: by 2002:a05:620a:6cb:: with SMTP id 11mr1040134qky.123.1571421449486; Fri, 18 Oct 2019 10:57:29 -0700 (PDT) Received: from quaco.ghostprotocols.net (179-240-170-47.3g.claro.net.br. [179.240.170.47]) by smtp.gmail.com with ESMTPSA id x9sm2840888qkl.75.2019.10.18.10.57.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 10:57:27 -0700 (PDT) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id B1E8E4DD66; Fri, 18 Oct 2019 14:57:21 -0300 (-03) Date: Fri, 18 Oct 2019 14:57:21 -0300 To: Leo Yan Cc: Mark Rutland , Will Deacon , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Brajeswar Ghosh , Souptick Joarder , Florian Fainelli , Adrian Hunter , Michael Petlan , Song Liu , linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 2/3] perf tests bp_account: Add dedicated checking helper is_supported() Message-ID: <20191018175721.GB1797@kernel.org> References: <20191018085531.6348-1-leo.yan@linaro.org> <20191018085531.6348-2-leo.yan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191018085531.6348-2-leo.yan@linaro.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Oct 18, 2019 at 04:55:30PM +0800, Leo Yan escreveu: > Arm architecture supports the 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. Looks sensible, Applied, thanks. - Arnaldo > Signed-off-by: Leo Yan > --- > 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 52ff7a462670..d0b935356274 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 55774baffc2a..8b286e9b7549 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 72912eb473cb..9837b6e93023 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__) > -- > 2.17.1 -- - Arnaldo