This commit is contained in:
Officeyutong
2024-02-22 13:14:00 +00:00
parent 403aff5b66
commit 55d5e641bf
47 changed files with 1483 additions and 1918 deletions

View File

@@ -1,33 +1,24 @@
#ifndef EBPF_EXAMPLE_GOROUTINE_H
#define EBPF_EXAMPLE_GOROUTINE_H
enum {
/*
* 0 ~ 16 for L7 socket event (struct socket_data_buffer),
* indicates the number of socket data in socket_data_buffer.
*/
/*
* For event registrion
*/
EVENT_TYPE_MIN = 1 << 5,
EVENT_TYPE_PROC_EXEC = 1 << 5,
EVENT_TYPE_PROC_EXIT = 1 << 6
// Add new event type here.
enum goroutine_state {
IDLE,
RUNNABLE,
RUNNING,
SYSCALL,
WAITING,
MORIBUND_UNUSED,
DEAD,
ENQUEUE_UNUSED,
COPYSTACK,
PREEMPTED,
};
// Description Provides basic information about an event
struct event_meta {
__u32 event_type;
struct goroutine_execute_data {
enum goroutine_state state;
unsigned long goid;
int pid;
int tgid;
};
// Process execution or exit event data
struct process_event_t {
struct event_meta meta;
__u32 pid; // process ID
__u8 name[TASK_COMM_LEN]; // process name
};
#endif