diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2010-12-22 18:57:02 +0100 | 
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2010-12-22 18:57:02 +0100 | 
| commit | 4b7bd364700d9ac8372eff48832062b936d0793b (patch) | |
| tree | 0dbf78c95456a0b02d07fcd473281f04a87e266d /include/linux/perf_event.h | |
| parent | c0d8768af260e2cbb4bf659ae6094a262c86b085 (diff) | |
| parent | 90a8a73c06cc32b609a880d48449d7083327e11a (diff) | |
| download | olio-linux-3.10-4b7bd364700d9ac8372eff48832062b936d0793b.tar.xz olio-linux-3.10-4b7bd364700d9ac8372eff48832062b936d0793b.zip  | |
Merge branch 'master' into for-next
Conflicts:
	MAINTAINERS
	arch/arm/mach-omap2/pm24xx.c
	drivers/scsi/bfa/bfa_fcpim.c
Needed to update to apply fixes for which the old branch was too
outdated.
Diffstat (limited to 'include/linux/perf_event.h')
| -rw-r--r-- | include/linux/perf_event.h | 41 | 
1 files changed, 27 insertions, 14 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 057bf22a832..4f1279e105e 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -747,6 +747,16 @@ struct perf_event {  	u64				tstamp_running;  	u64				tstamp_stopped; +	/* +	 * timestamp shadows the actual context timing but it can +	 * be safely used in NMI interrupt context. It reflects the +	 * context time as it was when the event was last scheduled in. +	 * +	 * ctx_time already accounts for ctx->timestamp. Therefore to +	 * compute ctx_time for a sample, simply add perf_clock(). +	 */ +	u64				shadow_ctx_time; +  	struct perf_event_attr		attr;  	struct hw_perf_event		hw; @@ -840,6 +850,7 @@ struct perf_event_context {  	int				nr_active;  	int				is_active;  	int				nr_stat; +	int				rotate_disable;  	atomic_t			refcount;  	struct task_struct		*task; @@ -876,6 +887,7 @@ struct perf_cpu_context {  	int				exclusive;  	struct list_head		rotation_list;  	int				jiffies_interval; +	struct pmu			*active_pmu;  };  struct perf_output_handle { @@ -898,20 +910,6 @@ extern int perf_num_counters(void);  extern const char *perf_pmu_name(void);  extern void __perf_event_task_sched_in(struct task_struct *task);  extern void __perf_event_task_sched_out(struct task_struct *task, struct task_struct *next); - -extern atomic_t perf_task_events; - -static inline void perf_event_task_sched_in(struct task_struct *task) -{ -	COND_STMT(&perf_task_events, __perf_event_task_sched_in(task)); -} - -static inline -void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next) -{ -	COND_STMT(&perf_task_events, __perf_event_task_sched_out(task, next)); -} -  extern int perf_event_init_task(struct task_struct *child);  extern void perf_event_exit_task(struct task_struct *child);  extern void perf_event_free_task(struct task_struct *task); @@ -1020,6 +1018,21 @@ have_event:  	__perf_sw_event(event_id, nr, nmi, regs, addr);  } +extern atomic_t perf_task_events; + +static inline void perf_event_task_sched_in(struct task_struct *task) +{ +	COND_STMT(&perf_task_events, __perf_event_task_sched_in(task)); +} + +static inline +void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next) +{ +	perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); + +	COND_STMT(&perf_task_events, __perf_event_task_sched_out(task, next)); +} +  extern void perf_event_mmap(struct vm_area_struct *vma);  extern struct perf_guest_info_callbacks *perf_guest_cbs;  extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks);  |