linux-mips
[Top] [All Lists]

Re: [PATCH v5 3/5] MIPS: perf: Reorganize contents of perf support files

To: David Daney <david.daney@cavium.com>
Subject: Re: [PATCH v5 3/5] MIPS: perf: Reorganize contents of perf support files.
From: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
Date: Sat, 24 Sep 2011 10:50:01 +0800
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org, Peter Zijlstra <a.p.zijlstra@chello.nl>, Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>, Arnaldo Carvalho de Melo <acme@redhat.com>, Dezhong Diao <dediao@cisco.com>, Gabor Juhos <juhosg@openwrt.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=BgqOJk7VdvwbOdYw2f/CKitPfbD33WUhDiB1ZMiNmqc=; b=X+2JKURbVmIG9yXFcQSTL5lT8g+b3tTeOUfLSBJck1nWyS4wItd2VF54/4rc8p8SZk WMQ9rKRcgWztlGec45+B0JlT3BOi3pgumtS13lPBBHaA1TgGoACj4sUEyQA8xO88Khck TbF1kb+l5Q8dgFwg9dEEDmIC3Xke7vBXHPPNU=
In-reply-to: <1316712378-7282-4-git-send-email-david.daney@cavium.com>
References: <1316712378-7282-1-git-send-email-david.daney@cavium.com> <1316712378-7282-4-git-send-email-david.daney@cavium.com>
Sender: linux-mips-bounce@linux-mips.org
2011/9/23 David Daney <david.daney@cavium.com>
>
> The contents of arch/mips/kernel/perf_event.c and
> arch/mips/kernel/perf_event_mipsxx.c were divided in a seemingly ad
> hoc manner, with the first including the second.
>
> I moved all the hardware counter support code to perf_event_mipsxx.c
> and removed the gating #ifdefs to the Kconfig and Makefile.
>
> Now perf_event.c contains only the callchain support, everything else
> is in perf_event_mipsxx.c
>

Sorry for my late comment. I personally don't think it's a bad idea to
use the original gating #ifdefs, because it allows sharing common code
among different types of MIPS PMUs. Also, using CPU types as compiling
conditions seems make sense. If you move the common hunk to
perf_event_mipsxx.c, other CPUs like loognson series will have to duplicate
these stuff.


Deng-Cheng

<Prev in Thread] Current Thread [Next in Thread>