| To: | Deng-Cheng Zhu <dengcheng.zhu@gmail.com> |
|---|---|
| Subject: | Re: [PATCH v2 4/4] MIPS: perf: Add support for 64-bit perf counters. |
| From: | David Daney <ddaney@caviumnetworks.com> |
| Date: | Thu, 17 Feb 2011 11:23:51 -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> |
| In-reply-to: | <AANLkTikTV-=A8H=h_F+025VB37tHSmxpsNCGndi_dAFW@mail.gmail.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <1295650776-28444-1-git-send-email-ddaney@caviumnetworks.com> <1295650776-28444-5-git-send-email-ddaney@caviumnetworks.com> <AANLkTimFnBJeU7BT6ARM=+KSod0UB-XFZTxgWWh1N=i2@mail.gmail.com> <4D3F68BE.5080803@caviumnetworks.com> <AANLkTim54xV64utR0GdS1r4_LBoAjEOHH9_=TYSLSqMF@mail.gmail.com> <4D41BC6B.8010408@caviumnetworks.com> <AANLkTi=R86zBH8ZY+CdGyeXsSd0-yHdRVVx0ZWTJf4qe@mail.gmail.com> <AANLkTikTV-=A8H=h_F+025VB37tHSmxpsNCGndi_dAFW@mail.gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10 |
On 02/17/2011 02:46 AM, Deng-Cheng Zhu wrote: Hi, David [...] And here's a general comment: You are putting the majority of the implementation in perf_event_mipsxx.c. This will require other CPUs like Loongson2 to replicate quite a lot code in their corresponding files. There is no such implementation. But if someone were to create one, I would suggest they move common code to a separate file that would be shared among the implementations that need it. I personally think the original "skeleton + #include perf_event_$cpu.c" is a better choice. I understand you prefer not using code like "#if defined(CONFIG_CPU_MIPS32)" on the top of perf_event_$cpu.c, but that is what other architectures (X86/ARM etc) are doing. Existing poor practice is not a good reason to do this. David Daney |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 1/2]: Add support for Dallas/Maxim DS1685/1687 RTC, Kumba |
|---|---|
| Next by Date: | [PATCH v3 0/4] MIPS: perf: Add support for 64-bit MIPS hardware counters., David Daney |
| Previous by Thread: | Re: [PATCH v2 4/4] MIPS: perf: Add support for 64-bit perf counters., David Daney |
| Next by Thread: | [PATCH] MIPS: Octeon: Kconfig: fix helper dependency, Antony Pavlov |
| Indexes: | [Date] [Thread] [Top] [All Lists] |