mirror of
https://github.com/eunomia-bpf/bpf-developer-tutorial.git
synced 2026-02-11 06:05:19 +08:00
Update README.md
This commit is contained in:
@@ -1,11 +1,5 @@
|
|||||||
## eBPF 入门开发实践指南八:在 eBPF 中使用 fentry 监测捕获 unlink 系统调用:
|
## eBPF 入门开发实践指南八:在 eBPF 中使用 exitsnoop 监控 进程退出事件:
|
||||||
|
##exitsnoop
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
|
||||||
/* Copyright (c) 2020 Facebook */
|
|
||||||
#include "vmlinux.h"
|
#include "vmlinux.h"
|
||||||
#include <bpf/bpf_helpers.h>
|
#include <bpf/bpf_helpers.h>
|
||||||
#include <bpf/bpf_tracing.h>
|
#include <bpf/bpf_tracing.h>
|
||||||
@@ -55,9 +49,6 @@ int handle_exit(struct trace_event_raw_sched_process_template* ctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
这段代码是一个 BPF 程序,用于监控 Linux 系统中的进程退出事件。它通过注册一个 tracepoint(“tp/sched/sched_process_exit”)来捕获进程退出事件,并使用 BPF 环形缓冲区来存储捕获的事件数据。
|
|
||||||
当系统中发生进程退出事件时,BPF 程序会捕获该事件,并调用“handle_exit”函数来处理它。该函数会检查
|
|
||||||
=======
|
=======
|
||||||
这段代码是一个 BPF 程序,用于监控 Linux 系统中的进程退出事件。BPF(Berkeley Packet Filter)是一种内核态程序设计语言,允许开发人员编写内核模块以捕获和处理内核事件。
|
这段代码是一个 BPF 程序,用于监控 Linux 系统中的进程退出事件。BPF(Berkeley Packet Filter)是一种内核态程序设计语言,允许开发人员编写内核模块以捕获和处理内核事件。
|
||||||
该程序通过注册一个 tracepoint,来监控进程退出事件。Tracepoint 是一种内核特性,允许内核模块获取特定事件的通知。在本程序中,注册的 tracepoint 是“tp/sched/sched_process_exit”,表示该程序监控的是进程退出事件。
|
该程序通过注册一个 tracepoint,来监控进程退出事件。Tracepoint 是一种内核特性,允许内核模块获取特定事件的通知。在本程序中,注册的 tracepoint 是“tp/sched/sched_process_exit”,表示该程序监控的是进程退出事件。
|
||||||
|
|||||||
Reference in New Issue
Block a user