当前位置:网站首页>[chromium] location information kernel debugging
[chromium] location information kernel debugging
2022-06-12 10:03:00 【Lindo】
Chromium Location Information kernel debugging
- edition :Chromium80
- background : be based on Chromium When developing the browser kernel . Sometimes the kernel Crash, The analysis of the tombstone is only PoskTask Execute its corresponding CallBack Collapse . And positioning problems , You need to know what the specific task is .
# base/callback.h
class OnceCallback<R(Args...)> : public internal::CallbackBase {
// Run When Crash 了 .
R Run(Args... args) && {
// Omit
}
}
- First , Just to understand Chromium Of Looper( It has been simplified according to personal understanding ).
- From above , We can see that . When analyzing the problem again ( Such as analyzing tombstones ), We need to know Caller And Exccutor Information about . how , Know the information of both ? Use Location You can know .
Location
- In general PostTask when , take Location The information is transmitted to the corresponding interface . Such as
// FROM_HERE by Location type
PostTaskOnThread(FROM_HERE, content::BrowserThread::UI,
base::Bind(&xxxx::func, ptr, args));
- Location Is defined as follows : Can get call PostTask The function name of 、 Row number 、 File names and so on . such , Then we can know CallBack Executive Task The specific content of .
// base/location.h
// Location provides basic info where of an object was constructed, or was
// significantly brought to life.
class BASE_EXPORT Location {
// Omit
// Will be nullptr for default initialized Location objects and when source
// names are disabled.
const char* function_name() const {
return function_name_; }
// Will be nullptr for default initialized Location objects and when source
// names are disabled.
const char* file_name() const {
return file_name_; }
// Will be -1 for default initialized Location objects and when source names
// are disabled.
int line_number() const {
return line_number_; }
// The address of the code generating this Location object. Should always be
// valid except for default initialized Location objects, which will be
// nullptr.
const void* program_counter() const {
return program_counter_; }
// Converts to the most user-readable form possible. If function and filename
// are not available, this will return "pc:<hex address>".
std::string ToString() const;
}
- If you use ? Examples are as follows
// xxx.cc
// stay Chromium Add the following information to the source code
// task->posted_from by Location type , It is assumed that this object has been defined in this file .
LOG(INFO) << "HelpInfo:"<< task->posted_from.ToString();
- Output information
[INFO:xxx.cc(99)] HelpInfo:[email protected]../../../../../xxxx/chromium/src/mojo/public/cpp/bindings/lib/connector.cc:560
边栏推荐
- 2022 pole technology communication - the dispute over anmou technology is settled, and the cornerstone of the local semiconductor industry is more stable
- Transport layer protocol -- TCP protocol
- True north reading notes
- SAP HANA 错误消息 SYS_XSA authentication failed SQLSTATE - 28000
- UE4_以现成资源探索创建背景场景的方法
- 7-4 网红点打卡攻略(dfs)
- C#入门系列(十二) -- 字符串
- Auto. JS learning notes 5:ui interface foundation of autojs Chapter 1
- Auto. JS learning notes 8: some common and important APIs
- 7-5 zhe zhe playing games
猜你喜欢

CEPH performance optimization and enhancement

Explanation of the principle of MySQL's leftmost matching principle

MYSQL的最左匹配原则的原理讲解

Li Yang, a scientific and technological innovator and CIO of the world's top 500 group: the success of digital transformation depends on people. Decision makers should always focus on "firewood"

True north reading notes

链式哈希表

UE4_以现成资源探索创建背景场景的方法
![[preview of the open class of Jishu] arm's strongest MCU core cortex-m85 processor helps the innovation of the Internet of things in an all-round way (there is a lottery)](/img/25/c3af3f51c04865820e3bbe2f010098.png)
[preview of the open class of Jishu] arm's strongest MCU core cortex-m85 processor helps the innovation of the Internet of things in an all-round way (there is a lottery)

Auto.js调试:使用雷电模拟器的网络模式进行调试

【926. 将字符串翻转到单调递增】
随机推荐
Yarn scheduling
MYSQL的最左匹配原则的原理讲解
7-13 underground maze exploration (adjacency table)
一文读懂Dfinity生态中的首个NFT平台:IMPOSSIBLE THINGS
string类对象的访问及遍历操作
Auto.js学习笔记4:autojs打包后,大部分华为等大牌子手机无法安装?利用模拟器远程在autoPro里签名打包可以解决该问题。
002:数据湖有哪些特征
np.meshgrid()函数 以及 三维空间中的坐标位置生成 以及 numpy.repeat()函数介绍
原始套接字使用
C language recursive folder code
First NFT platform in dfinity Ecology: impossible thoughts
科创人·世界500强集团CIO李洋:数字化转型成事在人,决策者应时刻聚焦于「柴」
Papaya Mobile has a comprehensive layout of cross-border e-commerce SaaS papaya orange. What are the opportunities for this new track?
C#入门系列(十二) -- 字符串
枚举所有USB设备代码
True north reading notes
Create simple windowing programs using Visual Studio 2017
Code implementation of hash table based on linear detection
Storage R & D Engineer Recruitment
In 2026, the capacity of China's software defined storage market will be close to US $4.51 billion