From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751331AbbIGMX7 (ORCPT ); Mon, 7 Sep 2015 08:23:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52357 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750848AbbIGMX4 (ORCPT ); Mon, 7 Sep 2015 08:23:56 -0400 Date: Mon, 7 Sep 2015 14:23:53 +0200 From: Jiri Olsa To: Matt Fleming Cc: Arnaldo Carvalho de Melo , Ingo Molnar , linux-kernel@vger.kernel.org, Andi Kleen , Vince Weaver , Peter Zijlstra , Kanaka Juvva , Vikas Shivappa , Matt Fleming Subject: Re: [PATCH 2/3] perf tests: Add arch tests Message-ID: <20150907122353.GF5806@krava.brq.redhat.com> References: <1441479742-15402-1-git-send-email-matt@codeblueprint.co.uk> <1441479742-15402-3-git-send-email-matt@codeblueprint.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1441479742-15402-3-git-send-email-matt@codeblueprint.co.uk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 05, 2015 at 08:02:21PM +0100, Matt Fleming wrote: SNIP > diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c > index 8cf0601d1662..a1b2265eaf55 100644 > --- a/tools/perf/tests/builtin-test.c > +++ b/tools/perf/tests/builtin-test.c > @@ -14,10 +14,17 @@ > #include "parse-options.h" > #include "symbol.h" > > -static struct test { > - const char *desc; > - int (*func)(void); > -} tests[] = { > +#if defined(__x86_64__) || defined(__i386__) > +#include "arch-tests.h" > +#else > +static struct test arch_tests[] = { > + { > + .func = NULL, > + }, > +}; > +#endif this could be defined as __weak array so we dont need to have #if above jirka