lkml.org 
[lkml]   [2022]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC V1 04/11] arm64/perf: Update struct pmu_hw_events for BRBE
    Date
    A single perf event instance BRBE related contexts and data will be tracked
    in struct pmu_hw_events. Hence update the structure to accommodate required
    details related to BRBE.

    Cc: Will Deacon <will@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
    ---
    include/linux/perf/arm_pmu.h | 22 ++++++++++++++++++++++
    1 file changed, 22 insertions(+)

    diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h
    index c0dd0d6c5883..c4a705d3d054 100644
    --- a/include/linux/perf/arm_pmu.h
    +++ b/include/linux/perf/arm_pmu.h
    @@ -41,6 +41,11 @@
    }, \
    }

    +/*
    + * Maximum branch records in BRBE
    + */
    +#define BRBE_MAX_ENTRIES 64
    +
    /* The events for a given PMU register set. */
    struct pmu_hw_events {
    /*
    @@ -67,6 +72,23 @@ struct pmu_hw_events {
    struct arm_pmu *percpu_pmu;

    int irq;
    +
    + /* Detected BRBE attributes */
    + bool v1p1;
    + int brbe_cc;
    + int brbe_nr;
    +
    + /* Evaluated BRBE configuration */
    + u64 brbfcr;
    + u64 brbcr;
    +
    + /* Tracked BRBE context */
    + unsigned int brbe_users;
    + void *brbe_context;
    +
    + /* Captured BRBE buffer - copied as is into perf_sample_data */
    + struct perf_branch_stack brbe_stack;
    + struct perf_branch_entry brbe_entries[BRBE_MAX_ENTRIES];
    };

    enum armpmu_attr_groups {
    --
    2.25.1
    \
     
     \ /
      Last update: 2022-01-24 05:34    [W:2.934 / U:0.804 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site