akaros/Documentation/kprof.txt
<<
>>
Prefs
   1The kprof devices samples the kernel IP at 1 Khz. 
   2
   3You have to bind into /net for now as 9namespace doesn't yet control /dev.
   4
   5bind -a '#K' /net
   6
   7set up your world.
   8
   9echo start > /net/kpctl
  10
  11run your tests
  12
  13echo stop > /net/kpctl
  14
  15get the data
  16cat /net/kpdata > some-file
  17
  18The file should probably NOT be on the akaros node, funnel it out over a mnt
  19or similar path to a persistent place where you can run tools.
  20
  21The data is in this form
  22pc name count-in-milliseconds
  23The format is
  24%016llx %29s %016llx\n
  25
  26The pc is 8-byte aligned. You'll see the function name a lot. You might want to reduce the
  27number of times you see it.
  28
  29One way to process:
  30
  31awk '{
  32> kp[$3]++;
  33> }
  34> END{
  35> for (var in kp)
  36> print var, " ", kp[var]
  37> }
  38> ' kp.txt
  39
  40Oh, and, currently, we tend to assume that the pc is a kernel pc. That's kind of dumb, and
  41we need to fix it.
  42