lkml.org 
[lkml]   [2021]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 2/7] perf: Create a symlink for a PMU
    From
    Date

    > But this is NOT how busses work in the driver model.
    >
    > PCI classes are great, but we do NOT suddenly add a symlink in sysfs if
    > a driver goes from being handled by "generic_pci_type_foo" to
    > "vendor_foo". Userspace can handle the change and life goes on.

    In perf this is exposed to the user command line, and lots of people
    configure their own events, so it's very common in scripts. To use the
    pmu you have to use something like perf stat -a -e uncore_foo/.../. So
    it's not a single thing that could be patched up.

    The perf tools supports PMUs abstractly and doesn't have special
    handling for every PMU. Also the perf design was always that the kernel
    should provide these abstractions with the user tool being (mostly)
    generic and abstract.


    > So a device name will move from "generic" to "specific", right?
    >
    > Why does a bus have to do with any of this?

    The perf pmus are in /sys/devices, so the symlinks for compatibility
    have to be created there.


    > But a driver does not caer. And if perf does not care, who cares?


    The users who write scripts that specify the perf events on the perf
    command line.


    -Andi


    \
     
     \ /
      Last update: 2021-06-24 19:29    [W:6.100 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site