【发布时间】:2017-08-02 18:49:46
【问题描述】:
我的任务是生成一个原始英特尔处理器跟踪。通过原始,我的意思是跟踪符合文件头:
struct pt_logfile_header {
unsigned int magic;
unsigned int version;
};
然后是各种进程、线程、xpage和缓冲区结构:
/* logitem header */
struct pt_logitem_header {
enum pt_logitem_kind kind;
unsigned int size;
};
/* type process */
struct pt_logitem_process {
struct pt_logitem_header header;
unsigned long tgid; // process id
unsigned long cmd_size; // the size of command string followed to launch this process
};
/* type thread */
struct pt_logitem_thread {
struct pt_logitem_header header;
unsigned long tgid; // process id
unsigned long pid; // thread id
};
/* type xpage */
struct pt_logitem_xpage {
struct pt_logitem_header header;
unsigned long tgid; // process id
unsigned long base; // the base address where executable pages were mapped
unsigned long size; // the total size of the executable pages
};
/* type buffer */
struct pt_logitem_buffer {
struct pt_logitem_header header;
unsigned long tgid; // process id
unsigned long pid; // thread id
unsigned long sequence; // a per-thread sequence number
unsigned long size; // the total size of PT packets followed
};
perf record 是否能够创建这种类型的跟踪或非常类似的东西?
【问题讨论】:
-
您从哪里获得 pt_logfile_header 和其他标头?这种跟踪模式的确切名称是什么(来自英特尔软件开发人员文档)?
标签: debugging intel trace processor perf