aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h30
1 files changed, 13 insertions, 17 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 1d795df6f4cf..f463a46424e2 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -21,7 +21,6 @@
21 */ 21 */
22 22
23#ifdef CONFIG_PERF_EVENTS 23#ifdef CONFIG_PERF_EVENTS
24# include <linux/cgroup.h>
25# include <asm/perf_event.h> 24# include <asm/perf_event.h>
26# include <asm/local64.h> 25# include <asm/local64.h>
27#endif 26#endif
@@ -128,6 +127,7 @@ struct hw_perf_event {
128 int event_base_rdpmc; 127 int event_base_rdpmc;
129 int idx; 128 int idx;
130 int last_cpu; 129 int last_cpu;
130 int flags;
131 131
132 struct hw_perf_event_extra extra_reg; 132 struct hw_perf_event_extra extra_reg;
133 struct hw_perf_event_extra branch_reg; 133 struct hw_perf_event_extra branch_reg;
@@ -299,22 +299,7 @@ struct swevent_hlist {
299#define PERF_ATTACH_GROUP 0x02 299#define PERF_ATTACH_GROUP 0x02
300#define PERF_ATTACH_TASK 0x04 300#define PERF_ATTACH_TASK 0x04
301 301
302#ifdef CONFIG_CGROUP_PERF 302struct perf_cgroup;
303/*
304 * perf_cgroup_info keeps track of time_enabled for a cgroup.
305 * This is a per-cpu dynamically allocated data structure.
306 */
307struct perf_cgroup_info {
308 u64 time;
309 u64 timestamp;
310};
311
312struct perf_cgroup {
313 struct cgroup_subsys_state css;
314 struct perf_cgroup_info *info; /* timing info, one per cpu */
315};
316#endif
317
318struct ring_buffer; 303struct ring_buffer;
319 304
320/** 305/**
@@ -583,11 +568,13 @@ struct perf_sample_data {
583 u32 reserved; 568 u32 reserved;
584 } cpu_entry; 569 } cpu_entry;
585 u64 period; 570 u64 period;
571 union perf_mem_data_src data_src;
586 struct perf_callchain_entry *callchain; 572 struct perf_callchain_entry *callchain;
587 struct perf_raw_record *raw; 573 struct perf_raw_record *raw;
588 struct perf_branch_stack *br_stack; 574 struct perf_branch_stack *br_stack;
589 struct perf_regs_user regs_user; 575 struct perf_regs_user regs_user;
590 u64 stack_user_size; 576 u64 stack_user_size;
577 u64 weight;
591}; 578};
592 579
593static inline void perf_sample_data_init(struct perf_sample_data *data, 580static inline void perf_sample_data_init(struct perf_sample_data *data,
@@ -601,6 +588,8 @@ static inline void perf_sample_data_init(struct perf_sample_data *data,
601 data->regs_user.abi = PERF_SAMPLE_REGS_ABI_NONE; 588 data->regs_user.abi = PERF_SAMPLE_REGS_ABI_NONE;
602 data->regs_user.regs = NULL; 589 data->regs_user.regs = NULL;
603 data->stack_user_size = 0; 590 data->stack_user_size = 0;
591 data->weight = 0;
592 data->data_src.val = 0;
604} 593}
605 594
606extern void perf_output_sample(struct perf_output_handle *handle, 595extern void perf_output_sample(struct perf_output_handle *handle,
@@ -799,6 +788,12 @@ static inline int __perf_event_disable(void *info) { return -1; }
799static inline void perf_event_task_tick(void) { } 788static inline void perf_event_task_tick(void) { }
800#endif 789#endif
801 790
791#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_NO_HZ_FULL)
792extern bool perf_event_can_stop_tick(void);
793#else
794static inline bool perf_event_can_stop_tick(void) { return true; }
795#endif
796
802#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_INTEL) 797#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_INTEL)
803extern void perf_restore_debug_store(void); 798extern void perf_restore_debug_store(void);
804#else 799#else
@@ -831,6 +826,7 @@ do { \
831struct perf_pmu_events_attr { 826struct perf_pmu_events_attr {
832 struct device_attribute attr; 827 struct device_attribute attr;
833 u64 id; 828 u64 id;
829 const char *event_str;
834}; 830};
835 831
836#define PMU_EVENT_ATTR(_name, _var, _id, _show) \ 832#define PMU_EVENT_ATTR(_name, _var, _id, _show) \