[BUG] The Perf support of MIPS is broken for the upstream changes

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

 



Hi, Deng Cheng

Just took a try to add the Perf support for Loongson but failed for
the skeleton of the Perf Support of MIPS was broken.

After some investigation, I have found several important changes have
been applied for the upstream Perf event, which has broken the Perf
support of MIPS.

Here lists several important changes:

1. e360adbe29241a0194e10e20595360dd7b98a2b3: irq_work: Add generic
hardirq context callbacks

    This commit has added "generic hardirq context
    callbacks": irq_work, which are designed particularly for NMI code that
    needs to interact with the rest of the system.

    Like ARM, MIPS performance counters do not raise NMI upon overflow,
    instead, they emit regular interrupts, so, simply remove the empty
    set_perf_event_pending() in perf_event.h and call irq_work_run() instead of
    perf_event_do_pend() is needed.

2. a4eaf7f14675cb512d69f0c928055e73d0c6d252: perf: Rework the PMU methods

   This has replaced the pmu::{enable,disable,start,stop,unthrottle} with
    pmu::{add,del,start,stop}, which has made the current implementation
    of Perf for MIPS completely broken, so, we also need to make related
    changes.

3. b0a873ebbf87bf38bf70b5e39a7cadc96099fa13: perf: Register PMU implementations

  The weak hw_perf_event_init() function is replaced by a new member:
event_init()
  of struct pmu().

You can track more upstream changes via the following command:

$ git log {kernel/perf_event.c,include/linux/perf_event.h}

Of course, at first, you may need to clone/pull a latest mainline kernel.

Regards,
Wu Zhangjin



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

  Powered by Linux