00001 /** @dir test4 00002 This example probe tracks file opens, reads and writes. 00003 It demonstrates maps, stats, and iterators. 00004 00005 This is a translation of on an old dtr probe. Original source is 00006 \verbatim 00007 global { 00008 long @opens[string]; 00009 sum @reads[string], @writes[string]; 00010 } 00011 00012 probe sys_open:entry { 00013 @opens[current->comm]++; 00014 } 00015 00016 probe sys_read:entry { 00017 @reads[current->comm] << count; 00018 } 00019 00020 probe sys_write:entry { 00021 @writes[current->comm] << count; 00022 } 00023 \endverbatim 00024 */