Messages in this thread | | | Date | Mon, 22 Jun 2009 12:56:09 +0200 | From | Ingo Molnar <> | Subject | Re: 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
| |