lkml.org 
[lkml]   [2009]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: gcov: enable GCOV_PROFILE_ALL for x86_64

Another thing i was thinking about:

the GCOV code cannot be enabled in distros right now, due to the
high compiler-generated overhead, and due to the fact that the gcov
data structures used are single threaded. (which makes a gcov
enabled kernel very slow on SMP, due to the global cacheline
bounces)

IMO it would be _much_ better to implement hardware-assisted
call-graph tracking:

- Use the BTS (Branch Trace Store) facilities to hardware-sample
all branches+calls (optionally, dynamically enable-able)

- Post-process the raw branch trace information (in the kernel
BTS-overflow irq handler) to calculate call-coverage information.

Unlike the unconditional GCC based GCOV stuff that is currently
upstream, BTS tracing is supported by a large range of hardware and
it can be enabled _transparently_, so it could be built in and
enabled by distros too, to test code coverage.

Would you be interested in looking at (and implementing) this?

Thanks,

Ingo


\
 
 \ /
  Last update: 2009-06-22 12:59    [W:0.322 / U:1.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site