Re: [PATCH 3/3] MIPS: implement hardware perf event support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Zhangjin


Thanks for your feedback!

2010/4/16 Wu Zhangjin <wuzhangjin@xxxxxxxxx>:
> Seems you only copied the contents from
> arch/mips/oprofile/op_model_mipsxx.c and handle the mipsxx, what about
> rm9000(arch/mips/oprofile/op_model_rm9000.c) and
> loongson2(arch/mips/oprofile/op_model_loongson2.c)?
>
> I think it will not work on rm9000 and loongson2 for their performance
> counters are different from mipsxx. so suggest you only enable this for
> mipsxxx(refer to arch/mips/oprofile/Makefile) via #ifdef and renaming
> the current perf_event.c to perf_event_mipsxx.c.
OK, I'll try to move the control/count help functions/defines and the
specific mips_pmu stuff into a file called perf_event_mipsxx.c, and leave
the common things in perf_event.c, so that when we implement Perf for
loongson2 or rm9000, we can simply add new files like
perf_event_loongson2.c.

> And to reduce the source code duplication, perhaps we need a solution to
> share the source code between Oprofile and Perf, and also among mipsxx,
> rm9000 and loongson2.
I think there is almost nothing for the count/control things which can be
shared among mipsxx/rm9000/loongson2. As for sharing between Oprofile and
Perf, how about moving mipsxx/rm9000/loongson2 count/control things into a
new file asm/pmu.h, where we use #ifdef's.


Deng-Cheng


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux