Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates > by-pkgid > fe7c341633b7d979ab8178b22304d6b5 > files > 79

systemtap-1.3-1.1.mga1.i586.rpm

#! /usr/bin/env stap

global device_of_interest

probe begin {
  /* The following is not the most efficient way to do this.
      One could directly put the result of usrdev2kerndev()
      into device_of_interest.  However, want to test out
      the other device functions */
  dev = usrdev2kerndev($1)
  device_of_interest = MKDEV(MAJOR(dev), MINOR(dev))
}

probe vfs.write, vfs.read
{
  if (dev == device_of_interest)
    printf ("%s(%d) %s 0x%x\n",
            execname(), pid(), probefunc(), dev)
}