diff --git a/.github/workflows/libbpf.yml b/.github/workflows/libbpf.yml index 1cda698ae..c5cf8003a 100644 --- a/.github/workflows/libbpf.yml +++ b/.github/workflows/libbpf.yml @@ -24,8 +24,8 @@ jobs: run: | sudo apt install clang libelf1 libelf-dev zlib1g-dev sudo apt install libbpf-dev - sudo apt install linux-tools-5.15.0-53-generic - sudo apt install linux-cloud-tools-5.15.0-53-generic + sudo apt install -y linux-tools-5.15.0-53-generic + sudo apt install -y linux-cloud-tools-5.15.0-53-generic - name: Run cs_delay run: | diff --git a/eBPF_Supermarket/CPU_Subsystem/cs_delay/BCC_cs_delay/cs_delay.c b/eBPF_Supermarket/CPU_Subsystem/cs_delay/BCC_cs_delay/cs_delay.c index 68b656b1b..2ea38ca05 100644 --- a/eBPF_Supermarket/CPU_Subsystem/cs_delay/BCC_cs_delay/cs_delay.c +++ b/eBPF_Supermarket/CPU_Subsystem/cs_delay/BCC_cs_delay/cs_delay.c @@ -3,9 +3,9 @@ BPF_ARRAY(start, u64,1); BPF_HISTOGRAM(dist); -int do_entry(struct pt_regs *ctx) //pt_regs½á¹¹¶¨ÒåÁËÔÚϵͳµ÷ÓûòÆäËûÄÚºËÌõÄ¿Æڼ佫¼Ä´æÆ÷´æ´¢ÔÚÄں˶ÑÕ»Éϵķ½Ê½ +int do_entry(struct pt_regs *ctx) //pt_regs�ṹ��������ϵͳ���û������ں���Ŀ�ڼ佫�Ĵ����洢���ں˶�ջ�ϵķ�ʽ { - u64 t1= bpf_ktime_get_ns()/1000; //bpf_ktime_get_ns·µ»Ø×ÔϵͳÆô¶¯ÒÔÀ´Ëù¾­¹ýµÄʱ¼ä(ÒÔÄÉÃëΪµ¥Î»)¡£²»°üÀ¨ÏµÍ³¹ÒÆðµÄʱ¼ä + u64 t1= bpf_ktime_get_ns()/1000; //bpf_ktime_get_ns������ϵͳ����������������ʱ��(������Ϊ��λ)��������ϵͳ�����ʱ�� int key=0; start.update(&key,&t1); @@ -28,4 +28,4 @@ int do_return(struct pt_regs *ctx) } return 0; -} +} \ No newline at end of file diff --git a/eBPF_Supermarket/CPU_Subsystem/libbpf b/eBPF_Supermarket/CPU_Subsystem/libbpf index 432a43485..966afdddf 160000 --- a/eBPF_Supermarket/CPU_Subsystem/libbpf +++ b/eBPF_Supermarket/CPU_Subsystem/libbpf @@ -1 +1 @@ -Subproject commit 432a4348579e0049af45c6712a2c1430f607b086 +Subproject commit 966afdddf6a6c46e55abdcaeed6d1e1fb0a6ba3a