Opened 14 years ago
Closed 10 years ago
#280 closed enhancement (fixed)
Taskdump should print fibril stacks
Reported by: | Jiri Svoboda | Owned by: | Jiri Svoboda |
---|---|---|---|
Priority: | major | Milestone: | 0.6.0 |
Component: | helenos/app/taskdump | Version: | |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description
Printing a stack trace is a good way to observe what a sleeping task is currently doing. This great for investigating hangs, for example.
As of changeset:mainline,781 taskdump
can (on some architectures at least) print the userspace stack of a thread which is currently executing a system call. Most tasks typically sleep waiting for IPC inside sys_ipc_wait_for_call() or similar.
This is still not very good because we will just see the stack trace of the manager fibril, yielding little useful information. What we need is to print stack traces of all fibrils, be they running, ready or sleeping.
Change History (7)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Milestone: | 0.4.3 → 0.5.0 |
---|
comment:3 by , 14 years ago
Component: | unspecified → app/taskdump |
---|
comment:4 by , 13 years ago
Milestone: | 0.5.0 → 0.5.1 |
---|
comment:5 by , 10 years ago
Milestone: | 0.5.1 → 0.5.2 |
---|
comment:6 by , 10 years ago
Milestone: | 0.6.1 → 0.6.0 |
---|---|
Owner: | set to |
Status: | new → accepted |
comment:7 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Fixed in mainline,2135. I added a list of all fibrils. taskdump looks it up in symbol table by name and walks it. It prints stack traces for all the fibrils. I generalized libc's stacktrace_print_fp_pc() to stacktrace_print_generic() which can be passed an ops structure with method for reading memory. In the end I did not use it, because it does not support translating addresses to symbol names yet, instead used the slightly modified version, td_stacktrace().
It would seem the simplest way is to obtain addresses of the
ready_list
,serialized_list
andmanager_list
(in fibril.c) from the symbol table.Note that fibril.c does not keep any list of 'sleeping' fibrils (fibrils which are neither in ready_list, serialized_list nor manager_list). We should introduce such list otherwise we would miss the most interesting fibrils.