From 2960eefb4bbc2a6effcaf1433f60d05b503577d9 Mon Sep 17 00:00:00 2001 From: Cheng Jian Date: Mon, 11 Oct 2021 22:51:09 +0800 Subject: [PATCH] description/tools: user_stack_backstrace-in-kerne --- study/kernel/00-DESCRIPTION/ARCH.md | 2 +- study/kernel/00-DESCRIPTION/DEBUGGING.md | 4 ++++ study/kernel/00-DESCRIPTION/TOOLS.md | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/study/kernel/00-DESCRIPTION/ARCH.md b/study/kernel/00-DESCRIPTION/ARCH.md index 8e9aee5..8838b14 100644 --- a/study/kernel/00-DESCRIPTION/ARCH.md +++ b/study/kernel/00-DESCRIPTION/ARCH.md @@ -205,7 +205,7 @@ TLB entry shootdown 常常或多或少的带来一些性能问题. [Magisk-Modules-Repo/benchkit](https://github.com/Magisk-Modules-Repo/benchkit) 项目汇总整理了 Android/Linux 上非常多的 benchmarks - +[Linux Benchmark Suite Homepage](http://lbs.sourceforge.net) 相关的文章介绍: [47]. diff --git a/study/kernel/00-DESCRIPTION/DEBUGGING.md b/study/kernel/00-DESCRIPTION/DEBUGGING.md index 800b1b7..0b07543 100644 --- a/study/kernel/00-DESCRIPTION/DEBUGGING.md +++ b/study/kernel/00-DESCRIPTION/DEBUGGING.md @@ -58,6 +58,10 @@ blogexcerpt: FZF 是目前最快的模糊搜索工具. 使用golang编写. 结 [探索Android平台ARM unwind技术](https://zhuanlan.zhihu.com/p/336916116) +[The Linux x86 ORC Stack Unwinder](https://www.codeblueprint.co.uk/2017/07/31/the-orc-unwinder.html) + +[Linux 内核的栈回溯与妙用](https://blog.csdn.net/qq_40732350/article/details/83649888) + | 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 | |:----:|:----:|:---:|:----:|:---------:|:----:| | 2018/11/23 | Shile Zhang | [Speed booting by sorting ORC unwind tables at build time](https://lore.kernel.org/patchwork/cover/1162315) | ORC unwind有两个表,.orc_unwind_ip和.orc_unwind 二分搜索需要排序。在构建时对其进行排序可以节省更多CPU周期有助于加快内核引导. 添加ORC表排序在一个独立的线程有助于避免更多的链接. | RFC v6 ☐ | [PatchWork v6](https://lore.kernel.org/patchwork/cover/1162315) | diff --git a/study/kernel/00-DESCRIPTION/TOOLS.md b/study/kernel/00-DESCRIPTION/TOOLS.md index be05f44..248157d 100644 --- a/study/kernel/00-DESCRIPTION/TOOLS.md +++ b/study/kernel/00-DESCRIPTION/TOOLS.md @@ -80,6 +80,22 @@ systrace, perfetto, drgn |:----:|:----:|:---:|:----:|:---------:|:----:| | 2012/06/23 | Peiyong Feng | [Implement uhook(call kernel func from userspace) driver](https://lwn.net/Articles/503414) | 提供了 uhook(userspace kernel hook) 驱动和工具用于在用户态直接调用内核态的函数, 这对于调试内核非常有帮助. | v1 ☐ | [LWN](https://lwn.net/Articles/503414), [bigfeng12/uhook](https://github.com/bigfeng12/uhook)
*-*-*-*-*-*-*-*
[LKML1](https://lkml.org/lkml/2012/6/22/570), [LKML2](https://lkml.org/lkml/2012/6/22/572) | +## 2.3 stack backtrace +------- + +在内核态尝试 dump 用户态的栈对调试是非常有帮助的. + +[how to print stack trace in-your-user](http://kungjohan.blogspot.com/2012/06/how-to-print-stack-trace-in-your-user.html) + +[how-to-dump-user-space-stack-in-kernel-space](https://stackoverflow.com/questions/38384259/how-to-dump-user-space-stack-in-kernel-space) + +[](https://groups.google.com/g/linux.kernel/c/ca3lZGlbnmo) + +| 时间 | 作者 | 特性 | 描述 | 是否合入主线 | 链接 | +|:----:|:----:|:---:|:----:|:---------:|:----:| +| 2019/06/23 | 胡俊鹏 and | [dongzhiyan-stack/user_stack_backstrace-in-kernel](https://github.com/dongzhiyan-stack/user_stack_backstrace-in-kernel) | 海康 CLK 2019 的一个 slides, 内核态回溯用户态栈. 对于一些比较难解析符号的场景也有对策 | v1 ☐ | [github](https://github.com/dongzhiyan-stack/user_stack_backstrace-in-kernel) | +| 2012/4/11 | "Tu, Xiaobing" | [kernel patch for dump user space stack tool](https://lkml.org/lkml/2012/4/11/49) | 内核态回溯用户态栈. | v1 ☐ | [LKML RFC 1/2](https://lkml.org/lkml/2012/4/11/49) | +