IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
1 Post

Pinned topic Probevue not working with user function probe

‏2012-05-11T14:30:56Z |
Hi everybody,

I have two AIX 6.1 LPARs, same configuration, same probevue command available (version/date).
I have two different applications, app A (c code) compiled with cc_r and app B (c++ code) compiled with xlC.
A is running on the first node, B on the second. The symbols table is present in both (dump -tv), executables are not stripped and are statically linked apart for some kernel shared libraries.

I defined a probevue script (script.e) to trace a library function present in the symbol table of both A and B.
The corresponding symbol name has "Scn" = ".text" and "Sclass"="extern", then the function is traceable according to:

This is the script:
int count;
{ printf("Start probing\n");}

{printf("Function called");}

where function_name is the same name of the corresponding symbol in the symbol table, but without dot (.).

I can successfully attach to application B and trace all calls to the function, but I get ERR19 (invalid probe) when trying to attach to process A. The script is the same and access rights on the two nodes allow execution of probevue and access to the processes.
In fact, if I try to trace system calls in process A, that works fine. It seems that probevue cannot probe any user function with @@uft probes in application B, only system calls with @@syscall.

So I guessed the problem might be caused by:

partial support for C code or C code not fully compliant to ANSI (cc_r allows pre-ANSI code).
impact of different flags implied by cc_r and xlC respectively.
Any other reasons?
Any feedback would be very much appreciated.