Kindling
Overview and Concepts
Overview
Trace Profiling
RPC Trace
Roadmap
Prometheus vs. Kindling vs. APM
How Kindling Agent is going to evolve
Installation
Kindling Agent
Requirements
Install Kindling in Kubernetes
Setting up Grafana
FAQ
Download Linux kernel headers
Usage
How to enable Trace Profiling
Prometheus Metrics Description
Use Cases
Service Map and Performance
Observe Java Lock
Developer Guide
Architecture
Build Kindling container image from source codes
Kindling agent-libs 用户态空间数据流
Kindling agent-libs内核态空间数据流
Kindling collector 流水线数据传递流程
Add new eBPF hooks
Kindling probe核心流程
Developer FAQ
Reference
Kindling Java Agent
Overview
Modifications of async-profiler
async-profiler 改造点
Trace Profiling Operation Manual
本文档使用 MrDoc 发布
-
+
home page
async-profiler 改造点
# 1 采集CPU数据 > ./profiler.sh -e cpu -d 60 $pid * AsyncProfiler 默认使用方式 * 采样采集 - 基于Perf定时(10ms)采样CPU数据,通过recordSample、recordExternalSample采集数据,并将数据存储到CallTraceStorage中; * 聚合输出 - 等关闭采集(Ctrl + C) 或 定时结束(60s)后将数据归并为火焰图数据输出到控制台。 ------------ * 需求 - 实时将采样堆栈数据输出到 /dev/null,进行On/Off CPU数据的匹配。 * ~~方案一:采集数据后补充符号信息直接输出到 /dev/null~~ * 缺点:采样方式是通过Signal Handler进行处理,期间必需保证信号安全;而符号解析过程无法保证信号安全容易导致应用Crash * 方案二 :先将数据存储、定时任务负责将符号解析并输出 > 采样采集 - `新增printSample()和printExternalSample() 2个API 替代recordXXX(),存储数据到FrameEventCache中` > 堆栈输出 - `每隔10ms定时将FrameEventCache中的数据取出并补充符号信息,输出到/dev/null` ------------ * 需求 - 允许AsyncProfiler多次启停不Crash * 由于定时任务解析符号用到了FrameName,只有应用关闭 或 关闭AsyncProfiler销毁FrameName,但在销毁过程时freelocale出现了Crash * 由于此功能是为了FIX Issue 94: Corrupted SVG due to Locale settings,用于导出SVG文件,当前场景不需要该功能 > 移除FrameName的`saved_local` ------------ # 2 采集LOCK数据 > ./profiler.sh -e lock -t $pid TODO # 3 采集线程名 TODO # 4 Jattach增强 由于应用大多数部署在容器中,原Jattach功能需确保容器内也能访问libasyncprofile.so。 ------------ * 需求 - 将探针自动拷贝到容器内 * 主机应用,将探针拷贝到`主机上的 /tmp/kindling/`下 * 容器应用,将探针拷贝到`容器内的 /tmp/kindling/`下 ------------ * 需求 - 为了确保探针升级,新版本探针attach过程不冲突 * 将不同版本探针存储在 `/tmp/kindling/<version>/`下 ------------ # 5 二进制打包 除了已有的二进制文件,将`agent目录`下kindling-java生成的jar包也进行打包。 ``` async-profiler-2.8.3-linux-x64 ├── agent │ ├── 1.0.0 │ │ ├── agent-core.jar │ │ └── plugin-traceid-sw.jar │ ├── agent-boot.jar │ └── version ├── build │ ├── async-profiler.jar │ ├── converter.jar │ ├── fdtransfer │ ├── jattach │ └── libasyncProfiler.so ├── CHANGELOG.md ├── LICENSE ├── profiler.sh └── README.md ```
xieyun
Oct. 27, 2022, 8:15 p.m.
Share documents
Collection documents
Last
Next
Scan wechat
Copy link
Scan your mobile phone to share
Copy link
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
share
link
type
password
Update password