当前位置: 首页 > 工具软件 > DTrace > 使用案例 >

php dtrace support,PHP DTrace 动态跟踪 使用 PHP 和 DTrace_编程学问网

朱梓
2023-12-01

#!/usr/sbin/dtrace -Zs

#pragma D option quiet

php*:::compile-file-entry

{

printf("PHP compile-file-entry\n");

printf(" compile_file %s\n", copyinstr(arg0));

printf(" compile_file_translated %s\n", copyinstr(arg1));

}

php*:::compile-file-return

{

printf("PHP compile-file-return\n");

printf(" compile_file %s\n", copyinstr(arg0));

printf(" compile_file_translated %s\n", copyinstr(arg1));

}

php*:::error

{

printf("PHP error\n");

printf(" errormsg %s\n", copyinstr(arg0));

printf(" request_file %s\n", copyinstr(arg1));

printf(" lineno %d\n", (int)arg2);

}

php*:::exception-caught

{

printf("PHP exception-caught\n");

printf(" classname %s\n", copyinstr(arg0));

}

php*:::exception-thrown

{

printf("PHP exception-thrown\n");

printf(" classname %s\n", copyinstr(arg0));

}

php*:::execute-entry

{

printf("PHP execute-entry\n");

printf(" request_file %s\n", copyinstr(arg0));

printf(" lineno %d\n", (int)arg1);

}

php*:::execute-return

{

printf("PHP execute-return\n");

printf(" request_file %s\n", copyinstr(arg0));

printf(" lineno %d\n", (int)arg1);

}

php*:::function-entry

{

printf("PHP function-entry\n");

printf(" function_name %s\n", copyinstr(arg0));

printf(" request_file %s\n", copyinstr(arg1));

printf(" lineno %d\n", (int)arg2);

printf(" classname %s\n", copyinstr(arg3));

printf(" scope %s\n", copyinstr(arg4));

}

php*:::function-return

{

printf("PHP function-return\n");

printf(" function_name %s\n", copyinstr(arg0));

printf(" request_file %s\n", copyinstr(arg1));

printf(" lineno %d\n", (int)arg2);

printf(" classname %s\n", copyinstr(arg3));

printf(" scope %s\n", copyinstr(arg4));

}

php*:::request-shutdown

{

printf("PHP request-shutdown\n");

printf(" file %s\n", copyinstr(arg0));

printf(" request_uri %s\n", copyinstr(arg1));

printf(" request_method %s\n", copyinstr(arg2));

}

php*:::request-startup

{

printf("PHP request-startup\n");

printf(" file %s\n", copyinstr(arg0));

printf(" request_uri %s\n", copyinstr(arg1));

printf(" request_method %s\n", copyinstr(arg2));

}

 类似资料: