/* * Copyright 2014, Michael Ellerman, IBM Corp. * Licensed under GPLv2. */ #ifndef _SELFTESTS_POWERPC_PMU_EBB_EBB_H #define _SELFTESTS_POWERPC_PMU_EBB_EBB_H #include "../event.h" #include "../lib.h" #include "trace.h" #include "reg.h" #define PMC_INDEX(pmc) ((pmc)-1) #define NUM_PMC_VALUES 128 struct ebb_state { struct { u64 pmc_count[6]; volatile int ebb_count; int spurious; int negative; int no_overflow; } stats; bool pmc_enable[6]; struct trace_buffer *trace; }; extern struct ebb_state ebb_state; #define COUNTER_OVERFLOW 0x80000000ull static inline uint32_t pmc_sample_period(uint32_t value) { return COUNTER_OVERFLOW - value; } static inline void ebb_enable_pmc_counting(int pmc) { ebb_state.pmc_enable[PMC_INDEX(pmc)] = true; } bool ebb_check_count(int pmc, u64 sample_period, int fudge); void event_leader_ebb_init(struct event *e); void event_ebb_init(struct event *e); void event_bhrb_init(struct event *e, unsigned ifm); void setup_ebb_handler(void (*callee)(void)); void standard_ebb_callee(void); int ebb_event_enable(struct event *e); void ebb_global_enable(void); void ebb_global_disable(void); bool ebb_is_supported(void); void ebb_freeze_pmcs(void); void ebb_unfreeze_pmcs(void); void event_ebb_init(struct event *e); void event_leader_ebb_init(struct event *e); int count_pmc(int pmc, uint32_t sample_period); void dump_ebb_state(void); void dump_summary_ebb_state(void); void dump_ebb_hw_state(void); void clear_ebb_stats(void); void write_pmc(int pmc, u64 value); u64 read_pmc(int pmc); void reset_ebb_with_clear_mask(unsigned long mmcr0_clear_mask); void reset_ebb(void); int ebb_check_mmcr0(void); extern u64 sample_period; int core_busy_loop(void); int ebb_child(union pipe read_pipe, union pipe write_pipe); int catch_sigill(void (*func)(void)); void write_pmc1(void); #endif /* _SELFTESTS_POWERPC_PMU_EBB_EBB_H */ 445d1f5627c4ba'>treecommitdiff
path: root/tools/perf/arch/arm/include
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2017-01-26 23:15:08 +0100
committerIngo Molnar <mingo@kernel.org>2017-01-30 11:41:26 +0100
commit0b3589be9b98994ce3d5aeca52445d1f5627c4ba (patch)
tree85d0d9b3ac902af2c938b19a566884caf8d00323 /tools/perf/arch/arm/include
parenta76a82a3e38c8d3fb6499e3dfaeb0949241ab588 (diff)
perf/core: Fix PERF_RECORD_MMAP2 prot/flags for anonymous memory
Andres reported that MMAP2 records for anonymous memory always have their protection field 0. Turns out, someone daft put the prot/flags generation code in the file branch, leaving them unset for anonymous memory. Reported-by: Andres Freund <andres@anarazel.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Don Zickus <dzickus@redhat.com Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@gmail.com> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: acme@kernel.org Cc: anton@ozlabs.org Cc: namhyung@kernel.org Cc: stable@vger.kernel.org # v3.16+ Fixes: f972eb63b100 ("perf: Pass protection and flags bits through mmap2 interface") Link: http://lkml.kernel.org/r/20170126221508.GF6536@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/arch/arm/include')