50,11 → 50,24 |
struct timespec start,end,diff; |
SYS_FLAGS f; |
|
/** Create 3 chunks for storing the tracer events. */ |
/** |
* Create 3 chunks for storing the tracer events. |
* Explanation of flags: |
* FTRACE_CHUNK_FLAG_FREE : the chunk is free to use |
* FTRACE_CHUNK_FLAG_CYC : the chunk stores events in a cyclical way. |
* When the chunk is full, |
* it will continue from the head. |
* FTRACE_CHUNK_FLAG_JTN : when the chunk is full, |
* it jumps to the next chunk. |
*/ |
a = FTrace_chunk_create(1000000, 1000000, FTRACE_CHUNK_FLAG_FREE | FTRACE_CHUNK_FLAG_CYC); |
b = FTrace_chunk_create(1000000, 1000000, FTRACE_CHUNK_FLAG_FREE | FTRACE_CHUNK_FLAG_JTN); |
c = FTrace_chunk_create(1000000, 1000000, FTRACE_CHUNK_FLAG_FREE | FTRACE_CHUNK_FLAG_CYC); |
|
/** |
* Link the 3 chunks together. |
* It is important to link before you can jump from one to another. |
*/ |
FTrace_chunk_link(a,b); |
FTrace_chunk_link(b,c); |
|