没有合适的资源?快使用搜索试试~ 我知道了~
Trace Event Format - Google Docs.pdf
需积分: 50 13 下载量 119 浏览量
2020-10-19
00:09:50
上传
评论
收藏 273KB PDF 举报
温馨提示
Trace-Viewer is the javascript frontend for Chrome about:tracing and Android systrace. https://github.com/catapult-project/catapult/tree/master/tracing
资源推荐
资源详情
资源评论
Trace Event Format
Last updated: October 2016
nduca@, dsinclair@
Introduction
JSON Format
JSON Array Format
JSON Object Format
Event Descriptions
Phases
Duration Events
Stack Traces on Duration Events
Complete Events
Instant Events
Counter Events
Async Events
Flow Events
Sample Events (deprecated)
Object Events
Snapshots
Snapshot category override
Snapshot base_type override
References
Metadata Events
Memory Dump Events
Mark Events
Clock Sync Event
Context Events
Linking IDs
More about IDs
StackFrames Dictionary
Global Samples
Linux Debug Format
Introduction
The Trace Event Format is the trace data representation that is processed by the Trace Viewer
1
application. Trace Viewer recognizes four input variations.
● Two are representations of the JSON format:
a. A string dump of a JSON array.
b. A JSON object.
● Two are representations of the Linux ftrace data:
1
https://github.com/catapult-project/catapult/tree/master/tracing
1
a. Text dump starting with # tracer: .
b. An Android systrace HTML dump.
This document describes the JSON input format and provides links for more information on the Linux
ftrace functionality.
JSON Format
The JSON events can be provided in two slightly different structures.
JSON Array Format
The simplest format accepted by the trace viewer is the JSON array format. Essentially, an array of event
objects. The events do not have to be in timestamp-sorted order.
[ { "name" : "Asub" , "cat" : "PERF" , "ph" : "B" , "pid" : 22630 , "tid" : 22630 , "ts" : 829 },
{ "name" : "Asub" , "cat" : "PERF" , "ph" : "E" , "pid" : 22630 , "tid" : 22630 , "ts" : 833 }
]
JSON Array Format
When provided as a string to the importer the ] at the end of the JSON Array Format is optional. The
Trace Viewer importer will automatically add a ] if needed to turn the string into valid JSON.. This is to
support tracing systems that can not cleanly finish writing the trace. For example, when tracing the exit of
a program.
JSON Object Format
The JSON Object Format allows for more flexibility in the data passed to Trace Viewer. There is one
required property, traceEvents , and some optional properties. The events do not have to be in
timestamp-sorted order.
{
"traceEvents" : [
{ "name" : "Asub" , "cat" : "PERF" , "ph" : "B" , "pid" : 22630 , "tid" : 22630 , "ts" :
829 },
{ "name" : "Asub" , "cat" : "PERF" , "ph" : "E" , "pid" : 22630 , "tid" : 22630 , "ts" :
833 }
],
"displayTimeUnit" : "ns" ,
"systemTraceEvents" : "SystemTraceData" ,
"otherData" : {
"version" : "My Application v1.0 "
},
"stackFrames": {...}
"samples": [...],
}
2
JSON Object Format
If provided displayTimeUnit is a string that specifies in which unit timestamps should be displayed. This
supports values of “ms” or “ns” . By default this is value is “ms” .
If provided systemTraceEvents is a string of Linux ftrace data or Windows ETW trace data. This data
must start with # tracer: and adhere to the Linux ftrace format or adhere to Windows ETW format.
If provided, powerTraceAsString is a string of BattOr power data.
If provided, the stackFrames field is a dictionary of stack frames, their ids, and their parents that allows
compact representation of stack traces throughout the rest of the trace file. It is optional but sometimes
very useful in shrinking file sizes.
The samples array is used to store sampling profiler data from a OS level profiler. It stores samples that
are different from trace event samples, and is meant to augment the traceEvent data with lower level
information. It is OK to have a trace event file with just sample data, but in that case traceEvents must
still be provided and set to []. For more information on sample data, refer to the global samples section .
If provided, controllerTraceDataKey is a string that specifies which trace data comes from tracing
controller. Its value should be the key for that specific trace data. For example, {...,
"controllerTraceDataKey": "traceEvents"} means the data for traceEvents comes from the tracing
controller. This is mainly for the purpose of clock synchronization.
Any other properties seen in the object, in this case otherData are assumed to be metadata for the trace.
They will be collected and stored in an array in the trace model. This metadata is accessible through the
Metadata button in Trace Viewer.
Event Descriptions
There are a common set of fields for each of the events.
{
"name" : "myName" ,
"cat" : "category,list" ,
"ph" : "B" ,
"ts" : 12345 ,
"pid" : 123 ,
"tid" : 456 ,
"args" : {
"someArg" : 1 ,
"anotherArg" : {
"value" : "my value"
}
}
3
剩余18页未读,继续阅读
资源评论
wang.wenchao
- 粉丝: 78
- 资源: 30
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Go和React的高质量企业微信私域流量管理系统 。遵守Apache2.0协议,全网唯一免费商用。企业微信、私域流量、SCRM。详细文档+优秀项目+全部资料.zip
- 基于Go和React的企业微信的开源 SCRM 系统。企微,个微,微信,聚合聊天,自动回复,加好友。详细文档+优秀项目+全部资料.zip
- 基于go语言的搜索引擎,信息检索系统详细文档+优秀项目+全部资料.zip
- 基于Go语言,Beego框架开发的简单的文章发布管理系统。详细文档+优秀项目+全部资料.zip
- 基于Go语言的轻量级高性能的分布式日志系统详细文档+优秀项目+全部资料.zip
- 基于go语言简单的用户管理系统详细文档+优秀项目+全部资料.zip
- 基于Go语言的一个秒杀系统详细文档+优秀项目+全部资料.zip
- 基于Go语言的一个简易blog系统详细文档+优秀项目+全部资料.zip
- 基于Go语言开发,具备高安全性、高性能和易扩展性的企业级内容管理系统,详细文档+优秀项目+全部资料.zip
- 基于Go语言实现的单点登录系统详细文档+优秀项目+全部资料.zip
- 基于Go语言实现的微服务电商系统详细文档+优秀项目+全部资料.zip
- 基于python和sql server2014做的商品学生信息管理系统,有界面,利用的sql server数据库详细文档+优秀项目+全部资料.zip
- 基于OWTP协议库,封装所有与openw-server钱包服务API交互方法。用于集成到go语言开发下的应用方系统。详细文档+优秀项目+全部资料.zip
- 基于Quasar和Go语言的功能全面的管理系统详细文档+优秀项目+全部资料.zip
- 基于SpringBoot 开发的员工的季度绩效考核系统详细文档+优秀项目+全部资料.zip
- 四足机器人技术发展及其应用场景概述
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功