/branches/tracing/kernel/doc/doxygroups.h |
---|
300,10 → 300,6 |
* @endcond |
*/ |
/** @defgroup tdebug Task Debugging |
* @ingroup kernel |
*/ |
/** @defgroup interrupt Interrupt handling and dispatching |
* @ingroup kernel |
*/ |
/branches/tracing/kernel/generic/include/tdebug/systdebug.h |
---|
File deleted |
/branches/tracing/kernel/generic/include/tdebug/tdebug.h |
---|
File deleted |
/branches/tracing/kernel/generic/include/tdebug/tdebug_type.h |
---|
File deleted |
/branches/tracing/kernel/generic/include/proc/task.h |
---|
52,7 → 52,6 |
#include <arch/cpu.h> |
#include <mm/tlb.h> |
#include <proc/scheduler.h> |
#include <tdebug/tdebug_type.h> |
struct thread; |
108,9 → 107,6 |
/** Accumulated accounting. */ |
uint64_t cycles; |
/** Task debugging stuff */ |
task_tdebug_t tdebug; |
} task_t; |
SPINLOCK_EXTERN(tasks_lock); |
/branches/tracing/kernel/generic/include/proc/thread.h |
---|
46,7 → 46,6 |
#include <arch/cpu.h> |
#include <mm/tlb.h> |
#include <proc/uarg.h> |
#include <tdebug/tdebug_type.h> |
#define THREAD_STACK_SIZE STACK_SIZE |
#define THREAD_NAME_BUFLEN 20 |
204,9 → 203,6 |
/** Thread's kernel stack. */ |
uint8_t *kstack; |
/** Task debugging stuff */ |
thread_tdebug_t tdebug; |
} thread_t; |
/** Thread list lock. |
252,8 → 248,6 |
extern void thread_update_accounting(void); |
extern bool thread_exists(thread_t *t); |
extern thread_t *thread_find_by_id(thread_id_t id); |
/** Fpu context slab cache. */ |
extern slab_cache_t *fpu_context_slab; |
/branches/tracing/kernel/generic/include/syscall/syscall.h |
---|
66,13 → 66,6 |
SYS_SYSINFO_VALID, |
SYS_SYSINFO_VALUE, |
SYS_DEBUG_ENABLE_CONSOLE, |
SYS_TDEBUG_ATTACH_TASK, |
SYS_TDEBUG_DETACH_TASK, |
SYS_TDEBUG_CONTINUE_THREAD, |
SYS_TDEBUG_GET_SYSCALL_ARGS, |
SYS_TDEBUG_SET_EVENT_MASK, |
SYS_TDEBUG_STOP_THREAD, |
SYS_TDEBUG_STOP_TASK, |
SYSCALL_END |
} syscall_t; |
/branches/tracing/kernel/generic/src/tdebug/systdebug.c |
---|
File deleted |
/branches/tracing/kernel/generic/src/tdebug/tdebug.c |
---|
File deleted |
/branches/tracing/kernel/generic/src/interrupt/interrupt.c |
---|
47,7 → 47,6 |
#include <panic.h> |
#include <print.h> |
#include <symtab.h> |
#include <tdebug/tdebug.h> |
static struct { |
const char *name; |
87,19 → 86,8 |
void exc_dispatch(int n, istate_t *istate) |
{ |
ASSERT(n < IVT_ITEMS); |
if (THREAD && istate_from_uspace(istate)) { |
/* Record userspace state */ |
THREAD->tdebug.uspace_state = istate; |
} |
exc_table[n].f(n + IVT_FIRST, istate); |
if (THREAD && istate_from_uspace(istate)) { |
/* Clear it again (mostly for dev. and debugging purposes) */ |
THREAD->tdebug.uspace_state = NULL; |
} |
/* This is a safe place to exit exiting thread */ |
if (THREAD && THREAD->interrupted && istate_from_uspace(istate)) |
thread_exit(); |
/branches/tracing/kernel/generic/src/proc/task.c |
---|
57,7 → 57,6 |
#include <errno.h> |
#include <func.h> |
#include <syscall/copy.h> |
#include <tdebug/tdebug.h> |
#ifndef LOADED_PROG_STACK_PAGES_NO |
#define LOADED_PROG_STACK_PAGES_NO 1 |
171,10 → 170,7 |
ta->capabilities = 0; |
ta->cycles = 0; |
/* init tdebug related stuff */ |
tdebug_task_init(ta); |
ipc_answerbox_init(&ta->answerbox); |
for (i = 0; i < IPC_MAX_PHONES; i++) |
ipc_phone_init(&ta->phones[i]); |
/branches/tracing/kernel/generic/src/proc/thread.c |
---|
68,7 → 68,6 |
#include <syscall/copy.h> |
#include <errno.h> |
#include <console/klog.h> |
#include <tdebug/tdebug.h> |
/** Thread states */ |
342,14 → 341,10 |
avltree_node_initialize(&t->threads_tree_node); |
t->threads_tree_node.key = (uintptr_t) t; |
// t->threads_tree_node.key = (avltree_key_t) t->tid; |
/* might depend on previous initialization */ |
thread_create_arch(t); |
thread_create_arch(t); |
/* init tdebug stuff */ |
tdebug_thread_init(t); |
if (!(flags & THREAD_FLAG_NOATTACH)) |
thread_attach(t, task); |
447,7 → 442,6 |
if (THREAD->flags & THREAD_FLAG_USPACE) { |
ipc_cleanup(); |
futex_cleanup(); |
tdebug_cleanup(); |
klog_printf("Cleanup of task %llu completed.", |
TASK->taskid); |
} |
755,56 → 749,6 |
return 0; |
} |
struct fbiw { |
thread_id_t tid; |
thread_t *t; |
}; |
static bool find_by_id_walker(avltree_node_t *node, void *arg) |
{ |
thread_t *t = avltree_get_instance(node, thread_t, threads_tree_node); |
struct fbiw *s = (struct fbiw *)arg; |
if (t->tid == s->tid) { |
/* found it! */ |
s->t = t; |
return false; |
} |
return true; /* continue */ |
} |
/** Find thread structure corresponding to thread ID. |
* |
* The threads_lock must be already held by the caller of this function |
* and interrupts must be disabled. |
* |
* @param id Thread ID. |
* |
* @return Thread structure address or NULL if there is no such thread ID. |
*/ |
thread_t *thread_find_by_id(thread_id_t id) |
{ |
struct fbiw s; |
s.t = NULL; |
s.tid = id; |
avltree_walk(&threads_tree, find_by_id_walker, &s); |
return s.t; |
/* |
// ANO, takhle krasne by to fungovalo, kdyby threads_tree |
// nepouzival jako klic pointer na vlakno misto tid |
avltree_node_t *node; |
node = avltree_search(&threads_tree, (avltree_key_t) id); |
if (node) |
return avltree_get_instance(node, thread_t, threads_tree_node); |
return NULL;*/ |
} |
/** Syscall for getting TID. |
* |
* @param uspace_thread_id Userspace address of 8-byte buffer where to store |
/branches/tracing/kernel/generic/src/syscall/syscall.c |
---|
44,8 → 44,6 |
#include <errno.h> |
#include <arch.h> |
#include <debug.h> |
#include <tdebug/tdebug.h> |
#include <tdebug/systdebug.h> |
#include <ipc/sysipc.h> |
#include <synch/futex.h> |
#include <ddi/ddi.h> |
107,15 → 105,7 |
task_kill(TASK->taskid); |
thread_exit(); |
} |
if (tdebug_have_monitor()) { |
/* generate a syscall debug event */ |
tdebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc); |
/* a good place to stop */ |
tdebug_stopping_point(); |
} |
if (THREAD->interrupted) |
thread_exit(); |
168,16 → 158,7 |
(syshandler_t) sys_sysinfo_value, |
/* Debug calls */ |
(syshandler_t) sys_debug_enable_console, |
/* Task debugging calls */ |
(syshandler_t) sys_tdebug_attach_task, |
(syshandler_t) sys_tdebug_detach_task, |
(syshandler_t) sys_tdebug_continue_thread, |
(syshandler_t) sys_tdebug_get_syscall_args, |
(syshandler_t) sys_tdebug_set_event_mask, |
(syshandler_t) sys_tdebug_stop_thread, |
(syshandler_t) sys_tdebug_stop_task |
(syshandler_t) sys_debug_enable_console |
}; |
/** @} |
/branches/tracing/kernel/Makefile |
---|
258,8 → 258,6 |
generic/src/printf/vsprintf.c \ |
generic/src/printf/vsnprintf.c \ |
generic/src/debug/symtab.c \ |
generic/src/tdebug/tdebug.c \ |
generic/src/tdebug/systdebug.c \ |
generic/src/time/clock.c \ |
generic/src/time/timeout.c \ |
generic/src/time/delay.c \ |
/branches/tracing/kernel/arch/ia32/include/tdebug.h |
---|
File deleted |
/branches/tracing/kernel/arch/ia32/Makefile.inc |
---|
151,5 → 151,4 |
arch/$(ARCH)/src/boot/boot.S \ |
arch/$(ARCH)/src/boot/memmap.c \ |
arch/$(ARCH)/src/fpu_context.c \ |
arch/$(ARCH)/src/debugger.c \ |
arch/$(ARCH)/src/tdebug.c |
arch/$(ARCH)/src/debugger.c |
/branches/tracing/kernel/arch/ia32/src/tdebug.c |
---|
File deleted |
/branches/tracing/uspace/app/tester/tdebug/tdebug1.def |
---|
File deleted |
/branches/tracing/uspace/app/tester/tdebug/tdebug1.c |
---|
File deleted |
/branches/tracing/uspace/app/tester/tester.c |
---|
57,7 → 57,6 |
#include "ipc/hangup.def" |
#include "devmap/devmap1.def" |
#include "vfs/vfs1.def" |
#include "tdebug/tdebug1.def" |
{NULL, NULL, NULL} |
}; |
80,10 → 79,9 |
static void run_safe_tests(void) |
{ |
test_t *test; |
unsigned int i = 0; |
unsigned int n = 0; |
int i = 0, n = 0; |
printf("\n*** Running all safe tests ***\n\n"); |
printf("\n*** Running all safe tests\n\n"); |
for (test = tests; test->name != NULL; test++) { |
if (test->safe) { |
94,7 → 92,7 |
} |
} |
printf("\nSafe tests completed, %u tests run, %u passed.\n\n", i + n, i); |
printf("\nSafe tests completed, %d tests run, %d passed.\n\n", i + n, i); |
} |
static void list_tests(void) |
/branches/tracing/uspace/app/tester/ipc/send_sync.c |
---|
38,10 → 38,10 |
static int msgid = 1; |
char c; |
printf("Select phoneid to send msg: 2-9 (q to skip)\n"); |
printf("Select phoneid to send msg: 2-9 (Q to skip)\n"); |
do { |
c = getchar(); |
if ((c == 'Q') || (c == 'q')) |
if (c == 'Q' || c == 'q') |
return TEST_SKIPPED; |
} while (c < '2' || c > '9'); |
phoneid = c - '0'; |
/branches/tracing/uspace/app/tester/ipc/send_async.c |
---|
41,10 → 41,10 |
static int msgid = 1; |
char c; |
printf("Select phoneid to send msg: 2-9 (q to skip)\n"); |
printf("Select phoneid to send msg: 2-9 (Q to skip)\n"); |
do { |
c = getchar(); |
if ((c == 'Q') || (c == 'q')) |
if (c == 'Q' || c == 'q') |
return TEST_SKIPPED; |
} while (c < '2' || c > '9'); |
phoneid = c - '0'; |
/branches/tracing/uspace/app/tester/ipc/connect.c |
---|
36,10 → 36,10 |
int svc; |
int phid; |
printf("Choose one service: 0:10000....9:10009 (q to skip)\n"); |
printf("Choose one service: 0:10000....9:10009 (Q to skip)\n"); |
do { |
c = getchar(); |
if ((c == 'Q') || (c == 'q')) |
if (c == 'Q' || c == 'q') |
return TEST_SKIPPED; |
} while (c < '0' || c > '9'); |
/branches/tracing/uspace/app/tester/tester.h |
---|
70,7 → 70,6 |
extern char * test_hangup(bool quiet); |
extern char * test_devmap1(bool quiet); |
extern char * test_vfs1(bool quiet); |
extern char * test_tdebug1(bool quiet); |
extern test_t tests[]; |
/branches/tracing/uspace/app/tester/Makefile |
---|
53,8 → 53,7 |
ipc/answer.c \ |
ipc/hangup.c \ |
devmap/devmap1.c \ |
vfs/vfs1.c \ |
tdebug/tdebug1.c |
vfs/vfs1.c |
OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
/branches/tracing/uspace/app/tetris/tetris.c |
---|
222,7 → 222,6 |
break; |
case 'h': |
*(int *)0 = 0; /* generate a page fault */ |
showscores(firstgame); |
tetris_menu_draw(*level); |
break; |
/branches/tracing/uspace/lib/libc/include/tdebug.h |
---|
File deleted |
/branches/tracing/uspace/lib/libc/generic/tdebug.c |
---|
File deleted |
/branches/tracing/uspace/lib/libc/Makefile |
---|
54,7 → 54,6 |
generic/thread.c \ |
generic/tls.c \ |
generic/task.c \ |
generic/tdebug.c \ |
generic/futex.c \ |
generic/io/io.c \ |
generic/io/printf.c \ |