diff options
| author | Merlin Scholz <merlin@scholz.ruhr> | 2023-03-14 15:05:19 +0100 |
|---|---|---|
| committer | Merlin Scholz <merlin@scholz.ruhr> | 2023-07-10 00:26:13 +0200 |
| commit | 07eb75078306673aea9312e7360b1950f81f3d18 (patch) | |
| tree | f95ebcda4a56bb018de891a815ce37a24e517f16 | |
| parent | 3eb716849b0ee5ec7f46a69a97d3fa5be3d39867 (diff) | |
Implement sending of LOCKDOC experiment information on startup
| -rw-r--r-- | sys/kern/init_main.c | 11 | ||||
| -rw-r--r-- | sys/lockdoc/log.c | 3 |
2 files changed, 13 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 1d2dbd742fe..eb90eceb92d 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -233,6 +233,10 @@ extern void *_binary_splash_image_end; #include <sys/userconf.h> +#ifdef LOCKDOC +#include <sys/lockdoc.h> +#endif + extern time_t rootfstime; #ifndef curlwp @@ -643,6 +647,13 @@ main(void) scdebug_init(); +#ifdef LOCKDOC + lockdoc_send_current_task_addr(); + lockdoc_send_lwp_flag_offset(); + lockdoc_send_pid_offset(); + lockdoc_send_kernel_version(); +#endif + /* * Create process 1 (init(8)). We do this now, as Unix has * historically had init be process 1, and changing this would diff --git a/sys/lockdoc/log.c b/sys/lockdoc/log.c index 4fbe3d4a7fd..84aba0893f5 100644 --- a/sys/lockdoc/log.c +++ b/sys/lockdoc/log.c @@ -25,7 +25,8 @@ void lockdoc_send_current_task_addr(void) { memset(&la_buffer,0,sizeof(la_buffer)); la_buffer.action = LOCKDOC_CURRENT_TASK; - //la_buffer.ptr = (uint32_t)PCPU_PTR(curlwp); TODO Implement + la_buffer.ptr = (uint32_t)((uint32_t)curcpu()->ci_self + offsetof(struct cpu_info, ci_curlwp)); + outb_(PING_CHAR,IO_PORT_LOG); lockdoc_x86_restore_intr(flags); |
