First oprofile file to build
authorRonald G. Minnich <rminnich@google.com>
Wed, 7 May 2014 23:17:21 +0000 (16:17 -0700)
committerRonald G. Minnich <rminnich@google.com>
Wed, 7 May 2014 23:21:29 +0000 (16:21 -0700)
commit223239de8e30c4ee2d11171a7b37dacb33a0fd6f
tree7f4432c61ffad27c9f46f7e2e2951a7d30653e83
parent319e93d71e4512288e66121a4f3928932ad0315d
First oprofile file to build

This is the one on which all else builds. It takes events of different types
and wedges them into the opq queue (i.e. queue struct that I'm about to
make available via #K).

This is not efficient. In fact it's quite stupid: it calls kzmalloc for each
sample! I have some ideas on how to make it very simply
efficient: just accumulate the cpu samples into a struct block and, when that block
is out of room, qbwrite it.

If that works, and is fast enough, giant gobs of nasty stuff that are in the Linux
driver will vanish in a puff of smoke. I suspect it will be fast enough. qbwrite
is just linked list manipulation, and if we make the block big enough
(64K will hold 16000 samples) I think we'll be able to just sail along.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
kern/include/oprofile.h [new file with mode: 0644]
kern/src/Kbuild
kern/src/oprofile/Kbuild [new file with mode: 0644]
kern/src/oprofile/cpu_buffer.c
kern/src/oprofile/cpu_buffer.h
kern/src/oprofile/event_buffer.h