摘要:
``` #cat /tmp/fff 10:hugetlb:/hello/06b11c9967cc0e106f5f4673246f671aa7388f623f58b250d9d9cb0f8c0f2b18 9:devices:/hello/06b11c9967cc0e106f5f4673246f671aa7388f623f58b250d9d9cb0f8c0f2b18 8:perf_event:/he... 阅读全文
摘要:
``` include include include include include include include include include include include define MAC_SIZE 18 define IP_SIZE 16 // function declare i 阅读全文
摘要:
perf_event 源码分析 前言 简单来说,perf是一种性能监测工具,它首先对通用处理器提供的performance counter进行编程,设定计数器阈值和事件,然后性能计数器就会在设定事件发生时递增计数器,直至这个计数器的计数值达到阈值,在不同的结构中对于计数器数值的提取有不同的方式,例如 阅读全文
摘要:
perf概念 perf_event Perf_events是目前在Linux上使用广泛的profiling/tracing工具,除了本身是内核(kernel)的组成部分以外,还提供了用户空间(user space)的命令行 工具(“perf”,“perf record”,“perf stat”等等) 阅读全文
摘要:
ftrace https://www.ibm.com/developerworks/cn/linux/l cn ftrace1/ https://www.ibm.com/developerworks/cn/linux/l cn ftrace/ 让内核.config支持ftrace的几个tracer: 阅读全文
摘要:
``` #include #include #include using namespace std; //key is: pid,cpuseq struct st_syscall { int min; }; //key is: pid,cpuseq struct st_pagfalt { int max; }; int type1() { struct st_syscall ... 阅读全文
摘要:
``` include include include include include using namespace std; class finder { public: finder(const std::string &cmp_string) :s_(cmp_string){} bool o 阅读全文
摘要:
Notice 1. 如果是program中有两个map对象,可能你需要两个map iterator,但是注意两个iter object不能命名一样,可以分别为iter1, iter2 Example include include using namespace std; struct Triple 阅读全文
摘要:
``` #include #include using namespace std; int main(){ map mp; for (int i = 0; i ::iterator it_find=mp.begin(); it_find = mp.find(9); if(it_find != mp.end()) { it_find->secon... 阅读全文