forked from hatem-mahmoud/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlatch_callgraph.stp
23 lines (19 loc) · 879 Bytes
/
latch_callgraph.stp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
global padding=-1
probe process("oracle").function("ksl_get_shared_latch") {
if (pid() == target()) {
padding=padding+1
printf ("%s->Shared Latch acquisition : laddr=%x ,wait=%d ,where=%d,why=%d,mode=%d\n", substr(" ",1,padding),register("rdi"), register("rsi"), register("rcx"), register("rdx"), register("r8") )
}
}
probe process("oracle").function("kslgetl") {
if (pid() == target()) {
padding=padding+1
printf ("%s->Exculsive Latch acquisition : laddr=%x ,wait=%d ,where=%d,why=%d\n", substr(" ",1,padding),register("rdi"), register("rsi"), register("rcx"), register("rdx") )
}
}
probe process("oracle").function("kslfre") {
if (pid() == target()) {
printf ("%s<-Latch released : laddr=%x\n", substr(" ",1,padding),register("rdi") )
padding=padding-1
}
}