Re: [PATCH v5 09/12] MIPS/Perf-events: replace pmu names with numeric IDs

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

 



2010/5/28 David Daney <david.s.daney@xxxxxxxxx>:
> I don't like this one.
>
> In cpu-probe.c we used to have this same type of parallel name array, and it
> was messy.
>
> You know what type of cpu you are running on, so I don't understand the
> advantage of querying by name.  What possible use could there be to knowing
> the names of processors that are not applicable to the current runtime?
[DC]:
1) It's not "querying by name", but "querying name by enum numbers".
2) Oprofile (now a client of Perf-events) needs to print out the PMU names
to the user. If we don't want this patch, we have 2 methods to do this:
- Export the whole mipspmu, and use mipspmu->name;
- Like the old Oprofile (mipsxx), do a 2nd "switch(current_cpu_type())",
the 1st is in perf_event_mipsxx.c init_hw_perf_events().
3) Exporting a single name array indexed by enum IDs should be convenient
for maintaince. Maybe I'm missing some considerations... But how do we
allow Oprofile to get the string name to the user? Not even need to do it?


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