summaryrefslogtreecommitdiff
path: root/include/linux/perf_counter.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2009-01-09 16:26:43 +1100
committerPaul Mackerras <paulus@samba.org>2009-01-09 16:26:43 +1100
commit9abf8a08bc8f18a3b125f834f00e2e71b49c15d2 (patch)
tree45d09a1251d6974575a89773aa53ece1f3966021 /include/linux/perf_counter.h
parentff6f05416ece2caec1a7a1f8180d6598e0ab9272 (diff)
downloadlwn-9abf8a08bc8f18a3b125f834f00e2e71b49c15d2.tar.gz
lwn-9abf8a08bc8f18a3b125f834f00e2e71b49c15d2.zip
perf_counter: Fix the cpu_clock software counter
Impact: bug fix Currently if you do (e.g.) timec -e -1 ls, it will report 0 for the value of the cpu_clock counter. The reason is that the core assumes that a counter's count field is up-to-date when the counter is inactive, and doesn't call the counter's read function. However, the cpu_clock counter code only updates the count in the read function. This fixes it by making both the read and disable functions update the count. It also makes the counter ignore time passing while the counter is disabled, by making the enable function update the hw.prev_count field. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/linux/perf_counter.h')
0 files changed, 0 insertions, 0 deletions