ucli: output
This commit is contained in:
@@ -156,7 +156,7 @@ void diag_printf_raw_stack(int pid, int ns_pid, const char *comm,
|
||||
entry_cb_arg_t unwind_arg;
|
||||
static u64 regs_buf[3];
|
||||
|
||||
printf(" USER STACK SP:%lx, BP:%lx, IP:%lx\n", raw_stack->sp,
|
||||
printf(" USER STACK: SP:%lx, BP:%lx, IP:%lx\n", raw_stack->sp,
|
||||
raw_stack->bp, raw_stack->ip);
|
||||
stack_sample.user_stack.offset = 0;
|
||||
stack_sample.user_stack.size = raw_stack->stack_size;
|
||||
@@ -252,10 +252,10 @@ std::string state_str(int __state){
|
||||
}
|
||||
|
||||
void printk_task_brief(task_detail *detail) {
|
||||
printf(" TASK INFO: [%s / %s], PID: %d / %d\n", detail->cgroup_buf, detail->comm, detail->tgid,
|
||||
printf(" TASK INFO: %s [%s / %s], PID: %d / %d\n", sys_task_str(detail->sys_task) ,detail->cgroup_buf, detail->comm, detail->tgid,
|
||||
detail->pid);
|
||||
printf(" TASK STATE: type: %s, state: %s, state %d\n", sys_task_str(detail->sys_task), state_str(detail->state).c_str(),
|
||||
detail->state);
|
||||
// printf(" TASK STATE: type: %s, state: %s, state %d\n", sys_task_str(detail->sys_task), state_str(detail->state).c_str(),
|
||||
// detail->state);
|
||||
}
|
||||
|
||||
void diag_printf_kern_stack(kern_stack_detail *kern_stack) {
|
||||
|
||||
@@ -115,9 +115,9 @@ static int task_info_extract(void *buf, unsigned int len, void *) {
|
||||
tsk_info = (variable_monitor_task *)buf;
|
||||
seq++;
|
||||
|
||||
printf("##CGROUP:[%s] %d [%03d] [%s]\n",
|
||||
printf("##CGROUP:[%s] %d [%03d] [%s] state: %d\n",
|
||||
tsk_info->task.cgroup_buf, tsk_info->task.pid, seq,
|
||||
tsk_info->task.state == 0 ? "R" : "D");
|
||||
state_str(tsk_info->task.state).c_str(),tsk_info->task.state);
|
||||
|
||||
printk_task_brief(&tsk_info->task);
|
||||
// diag_printf_raw_stack(tsk_info->task.tgid, tsk_info->task.container_tgid,
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <cstddef> // size_t
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
|
||||
// ioctl
|
||||
#define IOCTL_WATCH_VARIABLE 0
|
||||
@@ -135,4 +137,6 @@ void diag_printf_raw_stack(int pid, int ns_pid, const char *comm,
|
||||
void diag_printf_kern_stack(kern_stack_detail *kern_stack);
|
||||
void diag_printf_proc_chains(proc_chains_detail *proc_chains);
|
||||
|
||||
std::string state_str(int __state);
|
||||
|
||||
#endif /* UAPI_H */
|
||||
Reference in New Issue
Block a user