Loading include/linux/perf_counter.h +3 −1 Original line number Diff line number Diff line Loading @@ -232,12 +232,14 @@ struct perf_counter_mmap_page { __u32 lock; /* seqlock for synchronization */ __u32 index; /* hardware counter identifier */ __s64 offset; /* add to hardware counter value */ __u64 time_enabled; /* time counter active */ __u64 time_running; /* time counter on cpu */ /* * Hole for extension of the self monitor capabilities */ __u64 __reserved[125]; /* align to 1k */ __u64 __reserved[123]; /* align to 1k */ /* * Control data for the mmap() data buffer. Loading kernel/perf_counter.c +6 −0 Original line number Diff line number Diff line Loading @@ -1782,6 +1782,12 @@ void perf_counter_update_userpage(struct perf_counter *counter) if (counter->state == PERF_COUNTER_STATE_ACTIVE) userpg->offset -= atomic64_read(&counter->hw.prev_count); userpg->time_enabled = counter->total_time_enabled + atomic64_read(&counter->child_total_time_enabled); userpg->time_running = counter->total_time_running + atomic64_read(&counter->child_total_time_running); barrier(); ++userpg->lock; preempt_enable(); Loading Loading
include/linux/perf_counter.h +3 −1 Original line number Diff line number Diff line Loading @@ -232,12 +232,14 @@ struct perf_counter_mmap_page { __u32 lock; /* seqlock for synchronization */ __u32 index; /* hardware counter identifier */ __s64 offset; /* add to hardware counter value */ __u64 time_enabled; /* time counter active */ __u64 time_running; /* time counter on cpu */ /* * Hole for extension of the self monitor capabilities */ __u64 __reserved[125]; /* align to 1k */ __u64 __reserved[123]; /* align to 1k */ /* * Control data for the mmap() data buffer. Loading
kernel/perf_counter.c +6 −0 Original line number Diff line number Diff line Loading @@ -1782,6 +1782,12 @@ void perf_counter_update_userpage(struct perf_counter *counter) if (counter->state == PERF_COUNTER_STATE_ACTIVE) userpg->offset -= atomic64_read(&counter->hw.prev_count); userpg->time_enabled = counter->total_time_enabled + atomic64_read(&counter->child_total_time_enabled); userpg->time_running = counter->total_time_running + atomic64_read(&counter->child_total_time_running); barrier(); ++userpg->lock; preempt_enable(); Loading