当前位置:网站首页>[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
- Ceph如何改善存储性能以及提升存储稳定性
- Using C language code to realize factory LCD RGB test program
- C# break continue return 三者区别
- Auto. JS learning notes 7: JS file calls functions and variables in another JS file to solve various problems of call failure
- In 2026, the capacity of China's software defined storage market will be close to US $4.51 billion
- 005: difference between data lake and data warehouse
- Periodic pains of cross-border e-commerce? Papaya mobile power as an independent station enabler
- 005:数据湖与数据仓库的区别
- SAP HANA 错误消息 SYS_XSA authentication failed SQLSTATE - 28000
猜你喜欢

1268_FreeRTOS任务上下文切换的实现

How CEPH improves storage performance and storage stability

SAP HANA 错误消息 SYS_XSA authentication failed SQLSTATE - 28000

Introduction to on-line circuit simulation and open source electronic hardware design

Web3.0与数字时尚,该如何落地?

001: what is a data lake?

Tap series article 3 | introduction to Tanzu application platform deployment reference architecture

Research on autojs wechat: the control IP in wechat on different versions of wechat or simulators is different.

Auto. JS debugging: use the network mode of lightning simulator for debugging

004:AWS数据湖解决方案
随机推荐
MYSQL的最左匹配原則的原理講解
7-4 网红点打卡攻略(dfs)
UE4_ Explore the method of creating background scenes with ready-made resources
[cloud native] establishment of Eureka service registration
【clickhouse专栏】基础数据类型说明
C# break continue return 三者区别
Crazy temporary products: super low price, big scuffle and new hope
C language recursive folder code
The Dragon Boat Festival is in good health -- people are becoming more and more important in my heart
MySQL optimized slow log query
2021-03-26
MYSQL的最左匹配原则的原理讲解
Auto. JS debugging: use the network mode of lightning simulator for debugging
005:数据湖与数据仓库的区别
np.meshgrid()函数 以及 三维空间中的坐标位置生成 以及 numpy.repeat()函数介绍
Chained hash table
gnu-efi开发环境设置
5种最常见的CEPH失败方案
SAP Hana error message sys_ XSA authentication failed SQLSTATE - 28000
Research on autojs wechat: the control IP in wechat on different versions of wechat or simulators is different.