IBM AIX Continuous Availability Features - IBM Redbooks
IBM AIX Continuous Availability Features - IBM Redbooks
IBM AIX Continuous Availability Features - IBM Redbooks
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
* will result in error out of read()->entry()<br />
*/<br />
__auto int auto_var;<br />
}<br />
thread_var=__arg1;<br />
global_var=get_userstring(__arg2,15);<br />
global_var1=__arg3;<br />
printf("At read()->entry():\n");<br />
printf("\tfile descriptor ====>%d\n", thread_var);<br />
printf("\tfile context (15 bytes)====>%s\n", global_var);<br />
printf("\tMAX buffer size ====>%d\n", global_var1);<br />
/* Valid built-in variables : __pid, __rv<br />
* __arg1, __arg2 and __arg2 are not valid here, they are valid only in<br />
* read()->entry()<br />
*/<br />
@@syscall:*:read:exit<br />
when ( __pid == $1 )<br />
{<br />
printf("At read()->exit(): bytes read=%d by read(%d, %s, %d)\n",__rv,<br />
thread_var, global_var, global_var1);<br />
}<br />
@@END<br />
{<br />
/*<br />
* auto_var not accessible here as its an Automatic variable in clause<br />
"read:entry"<br />
*/<br />
printf("\nthread_var=%d global_var=%s global_var1=%d\n", thread_var,<br />
global_var, global_var1);<br />
}<br />
Example 3-42 displays the C file that will be traced using the Vue script.<br />
Example 3-42 Sample C program to be traced<br />
#include <br />
main()<br />
{<br />
int x,rc,fd;<br />
int buff[4096];<br />
for (x=0; x