Skip to content

Commit

Permalink
修改: libbpf.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
albertxu216 committed Nov 10, 2023
1 parent b46bcf9 commit 75ebaec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/libbpf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -28,4 +28,4 @@ int do_return(struct pt_regs *ctx)
}

return 0;
}
}
2 changes: 1 addition & 1 deletion eBPF_Supermarket/CPU_Subsystem/libbpf

0 comments on commit 75ebaec

Please sign in to comment.