code clean

This commit is contained in:
zy
2023-12-05 04:42:53 -05:00
parent 2050806caf
commit 76213bc8bc
2 changed files with 6 additions and 5 deletions

View File

@@ -122,12 +122,12 @@ static int task_info_extract(void *buf, unsigned int len, void *) {
printk_task_brief(&tsk_info->task);
// diag_printf_raw_stack(tsk_info->task.tgid, tsk_info->task.container_tgid,
// tsk_info->task.comm, &tsk_info->raw_stack);
printf("run_in_host: %d\n", run_in_host);
// printf("run_in_host: %d\n", run_in_host);
diag_printf_raw_stack(run_in_host ? tsk_info->task.tgid
: tsk_info->task.container_tgid,
tsk_info->task.container_tgid, tsk_info->task.comm,
&tsk_info->raw_stack);
test(tsk_info);
// test(tsk_info);
diag_printf_kern_stack(&tsk_info->kern_stack);
printf("#* 0xffffffffffffff %s (UNKNOWN)\n", tsk_info->task.comm);
@@ -209,6 +209,7 @@ static void do_tgid(char *arg) {
int main(int argc, char *argv[]) {
run_in_host = check_in_host();
printf("run_in_host: %d\n", run_in_host);
for (int i = 0; i < argc; i++){
printf("argv[%d]: %s\n", i, argv[i]);

View File

@@ -43,7 +43,7 @@ void *customFunction1(void *n) {
while (1) {
sleep(1);
} // never return, keep stack
return NULL;
// return NULL;
} else {
printf("Calling customFunction2\n");
customFunction2(num-1);
@@ -59,7 +59,7 @@ void customFunction2(int n) {
while (1) {
sleep(1);
} // never return, keep stack
return NULL;
// return NULL;
}
customFunction3(n-1);
}
@@ -72,7 +72,7 @@ void customFunction3(int n) {
while (1) {
sleep(1);
} // never return, keep stack
return NULL;
// return NULL;
}
customFunction2(n-1);
}