• Home
Name Date Size #Lines LOC

..--

figures/12-May-2024-

KconfigD12-May-2024223 66

MakefileD12-May-2024160 32

README_zh.mdD12-May-20241.4 KiB3324

apply_ucollection.shD12-May-2024765 3218

ucollection_process_cpu.cD12-May-20245.6 KiB215182

ucollection_process_cpu.hD12-May-2024285 104

unified_collection_data.hD12-May-20241.3 KiB4937

unified_collection_driver.cD12-May-20242.3 KiB9070

README_zh.md

1## 背景
2当前系统需要获取进程的CPU维测数据,支持开发者性能问题分析,通过遍例所有进程的结点虽然可以获取所有进程的CPU使用率,但是该方法性能相对较差,为了提升获取效率,因此开僻了内核的设备结点,通过结点可能快速获取CPU的数据。
3
4## ucollection(unified collection)模块
5通过ioctl的方式向设备结点/dev/uncollection发送命令,内核根据不同的命令做不同的处理,返回相应的维测数据。
6![framework](figures/collector_framework.png)
7
8## 目录
9统一采集设备的主要代码目录结构如下:
10
11```
12# 代码路径 /kernel/linux/common_modules/xpm
13├── apply_ucollection.sh          # XPM 头文件
14├── figures                       # ReadMe 内嵌图例
15├── Konfig
16├── Makefile
17├── README_zh.md
18├── ucollection_process_cpu.c     # 获取进程CPU数据
19├── ucollection_process_cpu.h
20├── unified_collection_data.h
21├── unified_collection_driver.c   # 注册/dev/ucollection设备
22```
23
24## 相关仓
25
26[内核子系统](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/%E5%86%85%E6%A0%B8%E5%AD%90%E7%B3%BB%E7%BB%9F.md)
27
28[kernel_linux_5.10](https://gitee.com/openharmony/kernel_linux_5.10)
29
30[kernel_linux_config](https://gitee.com/openharmony/kernel_linux_config)
31
32[kernel_linux_build](https://gitee.com/openharmony/kernel_linux_build)
33