This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Simple(?) question


Thanks Frank! This worked:

# cat adb-timo-hist.stp
%{
#include <linux/blkdev.h>
%}
global rd_hist, wr_hist

probe kernel.function("__generic_unplug_device") {
   rd_hist <<< $q->rq->count[0]
   wr_hist <<< $q->rq->count[1]
}

probe end {
   printf("Read counts\n");
   print(@hist_linear(rd_hist, 0, 64, 1))
   printf("Write counts\n");
   print(@hist_linear(wr_hist, 0, 64, 1))
       exit()
}

(changed to a linear output - result:

# stap -g adb-timo-hist.stp
^C
Read counts
value |-------------------------------------------------- count
   0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  7968042
   1 |                                                    136986
   2 |                                                      1943
   3 |                                                        66
   4 |                                                         0
   5 |                                                         0

Write counts
value |-------------------------------------------------- count
   0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  5252766
   1 |@@@@@@@@@@@                                        1160848
   2 |@@@@@@@@@@                                         1129149
   3 |@@                                                  273890
   4 |@                                                   181819
   5 |                                                     53176
   6 |                                                     32574
   7 |                                                     11529
   8 |                                                      6342
   9 |                                                      2432
  10 |                                                      1300
  11 |                                                       542
  12 |                                                       311
  13 |                                                       118
  14 |                                                        71
  15 |                                                        35
  16 |                                                        37
  17 |                                                        23
  18 |                                                        18
  19 |                                                        16
  20 |                                                        12
  21 |                                                        12
  22 |                                                         3
  23 |                                                         2
  24 |                                                         1
  25 |                                                         0
  26 |                                                         1
  27 |                                                         0
  28 |                                                         0
  29 |                                                         0
  30 |                                                         1
  31 |                                                         0
  32 |                                                         0
  33 |                                                         0
  34 |                                                         1
  35 |                                                         0
  36 |                                                         0
  37 |                                                         0
  38 |                                                         1
  39 |                                                         0
  40 |                                                         0
  41 |                                                         0
  42 |                                                         1
  43 |                                                         0
  44 |                                                         0
  45 |                                                         0
  46 |                                                         1
  47 |                                                         0
  48 |                                                         0
  49 |                                                         0
  50 |                                                         1
  51 |                                                         0
  52 |                                                         0
  53 |                                                         0
  54 |                                                         1
  55 |                                                         0
  56 |                                                         0
  57 |                                                         0
  58 |                                                         1
  59 |                                                         0
  60 |                                                         0
  61 |                                                         0
  62 |                                                         1
  63 |                                                         1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]