Added syscall tracing support.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11318 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -180,9 +180,15 @@ _user_socket(int family, int type, int proto)
|
|||||||
int32
|
int32
|
||||||
syscall_dispatcher(uint32 call_num, void *args, uint64 *call_ret)
|
syscall_dispatcher(uint32 call_num, void *args, uint64 *call_ret)
|
||||||
{
|
{
|
||||||
|
bigtime_t startTime;
|
||||||
|
|
||||||
// dprintf("syscall_dispatcher: thread 0x%x call 0x%x, arg0 0x%x, arg1 0x%x arg2 0x%x arg3 0x%x arg4 0x%x\n",
|
// dprintf("syscall_dispatcher: thread 0x%x call 0x%x, arg0 0x%x, arg1 0x%x arg2 0x%x arg3 0x%x arg4 0x%x\n",
|
||||||
// thread_get_current_thread_id(), call_num, arg0, arg1, arg2, arg3, arg4);
|
// thread_get_current_thread_id(), call_num, arg0, arg1, arg2, arg3, arg4);
|
||||||
|
|
||||||
|
user_debug_pre_syscall(call_num, args);
|
||||||
|
|
||||||
|
startTime = system_time();
|
||||||
|
|
||||||
switch (call_num) {
|
switch (call_num) {
|
||||||
// the cases are auto-generated
|
// the cases are auto-generated
|
||||||
#include "syscall_dispatcher.h"
|
#include "syscall_dispatcher.h"
|
||||||
@@ -191,6 +197,8 @@ syscall_dispatcher(uint32 call_num, void *args, uint64 *call_ret)
|
|||||||
*call_ret = -1;
|
*call_ret = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
user_debug_post_syscall(call_num, args, *call_ret, startTime);
|
||||||
|
|
||||||
// dprintf("syscall_dispatcher: done with syscall 0x%x\n", call_num);
|
// dprintf("syscall_dispatcher: done with syscall 0x%x\n", call_num);
|
||||||
|
|
||||||
return B_INVOKE_SCHEDULER;
|
return B_INVOKE_SCHEDULER;
|
||||||
|
|||||||
Reference in New Issue
Block a user