|To:||Deng-Cheng Zhu <firstname.lastname@example.org>, email@example.com|
|Subject:||Re: [PATCH v5 3/5] MIPS: perf: Reorganize contents of perf support files.|
|From:||David Daney <firstname.lastname@example.org>|
|Date:||Sat, 24 Sep 2011 13:44:00 -0700|
|Cc:||David Daney <email@example.com>, firstname.lastname@example.org, Peter Zijlstra <email@example.com>, Paul Mackerras <firstname.lastname@example.org>, Ingo Molnar <email@example.com>, Arnaldo Carvalho de Melo <firstname.lastname@example.org>, Dezhong Diao <email@example.com>, Gabor Juhos <firstname.lastname@example.org>|
|Dkim-signature:||v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=vW0ZMwUv0bT+TT0015h5EbxHhdfV6n1x05DRA6jV1ss=; b=SUA5ii+yuY81YPWDTeH9AsN5nRXu0OXV/xyqFCyu3fXRbBnu7nY96zfNc3glZLG8Mi 5U+AuWaLQ0PDnahebO96135J9bk7c5q10Suwrz2pvbi7yhxNX2PKcCldi3a1YIKHfF0E 9QkeJ3/+P/U8hG0NZONhM49iO/jOLTC4Yi/qI=|
|References:||<email@example.com> <firstname.lastname@example.org> <CAOfQC98+G6Ar8RAT8697GS3MMhEQH86WSyrGjPAo4ELMCWzJHw@mail.gmail.com>|
|User-agent:||Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:220.127.116.11) Gecko/20110428 Fedora/3.1.10-1.fc13 Thunderbird/3.1.10|
On 09/23/2011 07:50 PM, Deng-Cheng Zhu wrote:
2011/9/23 David Daney<email@example.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.cSorry 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.
I disagree, and here is why: Almost all the the code is mipsxx specific.If Loongson has a PMU that can reuse this code, it can just be added to perf_event_mipsxx.c along with all the other mips compatible PMUs
If this is not feasible, then it can have its own file and and common code can be removed to a common place at that time.
In any event, I have not seen any Loongson PMU patches, if someone has such patches I would be happy to consider changes that would make the kernel as a whole cleaner. But preventing cleanup and removal of a ton of #ifdefery in hope that Loongson patches may someday want something different is not what I would call a good way forward.
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||[PATCH 2/2] MIPS: Alchemy: drop MIRAGE/BOSPORUS board support, Manuel Lauss|
|Next by Date:||Re: [PATCH v5 4/5] MIPS: perf: Add support for 64-bit perf counters., David Daney|
|Previous by Thread:||Re: [PATCH v5 3/5] MIPS: perf: Reorganize contents of perf support files., Deng-Cheng Zhu|
|Next by Thread:||Re: [PATCH v5 3/5] MIPS: perf: Reorganize contents of perf support files., Deng-Cheng Zhu|
|Indexes:||[Date] [Thread] [Top] [All Lists]|