00001
00002
00003
00004
00005
00006
00007 #pragma D option quiet
00008
00009 self int indent;
00010 self int times[int];
00011
00012 php$target:::function-entry
00013 {
00014 @counts[copyinstr(arg0)] = count();
00015 printf("%*s", self->indent, "");
00016 printf("-> %s\n", copyinstr(arg0));
00017 self->times[self->indent] = timestamp;
00018 self->indent += 2;
00019 }
00020
00021 php$target:::function-return
00022 {
00023 self->indent -= 2;
00024 printf("%*s", self->indent, "");
00025 printf("<- %s %dus\n", copyinstr(arg0), (timestamp - self->times[self->indent]) / 1000);
00026 }