Generic tracer

gt is very simple win32 tracer, in some way similar to strace *NIX tool.
One reason I blog about it here because it supports Oracle RDBMS .SYM symbol files.
Readme file is here and download it here.

Few examples:

Memory allocations and deallocations:

gt.exe -a:oracle.exe bpf=.*!_kghalf,args:6 bpf=.*!_kghfrf,args:4

Dump calling stack before each call:

gt.exe -a:oracle.exe -s bpf=.*!_kghalf,args:6 bpf=.*!_kghfrf,args:4

gt tool can easily supersede my old "Oracle SPY" utility ( http://blogs.conus.info/node/9 ):
For 11g:

gt.exe -a:oracle.exe bpf=oracle.exe!_rpisplu,args:8 bpf=oracle.exe!_kprbprs,args:7 bpf=oracle.exe!_opiprs,args:6 bpf=oraclient11.dll!_OCIStmtPrepare,args:6

For 10gR2:

gt.exe -a:oracle.exe bpf=oracle.exe!_rpisplu,args:7 bpf=oracle.exe!_kprbprs,args:7 bpf=oracle.exe!_opiprs,args:6 bpf=oraclient10.dll!_OCIStmtPrepare,args:6

gt can also supersede my old "Oracle SPY Events" uility ( http://blogs.conus.info/node/14 ).
Unfortunately, this works only for 10gR2:

gt.exe -a:oracle.exe bpf=oracle.exe!_ksdpec,args:1 bpf=oracle.exe!_ss_wrtf,args:3

Please note that all printed arguments are in hexadecimal form.

Comments

не работает :(

в журнал gt.log ничего не сыпется.
ОС win XP SP2

>D:\projects\VS2008\gt01>gt.exe -a:oracle.exe
>generic tracer 0.1, http://conus.info/gt
>
>New process: C:\oracle\product\10.2.0\db_1\BIN\oracle.exe, PID=3684
>

Посмотрите там же, где вы

Посмотрите там же, где вы запускаете gt.exe

Do I correctly understand

Do I correctly understand what the program works only with BPF option? And don't exist options to trace ALL functions calls
Because the gt.exe didn't write function calls in the gt.log and stdout also without this option.

--
Thanks

Yes, you right, there're no

Yes, you right, there're no option to trace all function calls.
Because, in practice, it is extremely slow.
However, maybe in future, I'll find a way to make it suitable and fast.