aboutsummaryrefslogtreecommitdiff
path: root/sys/ddb/ddb.h
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2002-12-28 01:23:07 +0000
committerJulian Elischer <julian@FreeBSD.org>2002-12-28 01:23:07 +0000
commit93a7aa79d628bf2b11ed75cba6fc1d904e3a4dd4 (patch)
tree34088f29c02f6a4d56466e7db0deb792a033cebc /sys/ddb/ddb.h
parent84cdcd85a03610d9a3113fbbc3a89da4e4298246 (diff)
downloadsrc-93a7aa79d628bf2b11ed75cba6fc1d904e3a4dd4.tar.gz
src-93a7aa79d628bf2b11ed75cba6fc1d904e3a4dd4.zip
Add code to ddb to allow backtracing an arbitrary thread.
(show thread {address}) Remove the IDLE kse state and replace it with a change in the way threads sahre KSEs. Every KSE now has a thread, which is considered its "owner" however a KSE may also be lent to other threads in the same group to allow completion of in-kernel work. n this case the owner remains the same and the KSE will revert to the owner when the other work has been completed. All creations of upcalls etc. is now done from kse_reassign() which in turn is called from mi_switch or thread_exit(). This means that special code can be removed from msleep() and cv_wait(). kse_release() does not leave a KSE with no thread any more but converts the existing thread into teh KSE's owner, and sets it up for doing an upcall. It is just inhibitted from being scheduled until there is some reason to do an upcall. Remove all trace of the kse_idle queue since it is no-longer needed. "Idle" KSEs are now on the loanable queue.
Notes
Notes: svn path=/head/; revision=108338
Diffstat (limited to 'sys/ddb/ddb.h')
-rw-r--r--sys/ddb/ddb.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h
index b706cc58c5b9..cd8839bcc457 100644
--- a/sys/ddb/ddb.h
+++ b/sys/ddb/ddb.h
@@ -104,6 +104,8 @@ void db_trap(int type, int code);
int db_value_of_name(const char *name, db_expr_t *valuep);
void db_write_bytes(vm_offset_t addr, size_t size, char *data);
/* machine-dependent */
+void db_stack_thread(db_expr_t addr, boolean_t have_addr,
+ db_expr_t count, char *modif);
void kdb_init(void);
db_cmdfcn_t db_breakpoint_cmd;
@@ -125,11 +127,11 @@ db_cmdfcn_t db_trace_until_call_cmd;
db_cmdfcn_t db_trace_until_matching_cmd;
db_cmdfcn_t db_watchpoint_cmd;
db_cmdfcn_t db_write_cmd;
+db_cmdfcn_t db_show_one_thread;
#if 0
db_cmdfcn_t db_help_cmd;
db_cmdfcn_t db_show_all_threads;
-db_cmdfcn_t db_show_one_thread;
db_cmdfcn_t ipc_port_print;
db_cmdfcn_t vm_page_print;
#endif