Rev 501 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
498 | giacomo | 1 | #include <FTrace_types.h> |
2 | #include <FTrace_OSD.h> |
||
3 | |||
4 | /* OSD_pointers |
||
5 | |||
6 | 00 - Actual Chunk Event Pointer Delta |
||
7 | 04 - Actual Chunk Mask |
||
8 | 08 - Actual Chunk Start |
||
9 | 12 - Actual Chunk Flags |
||
10 | 16 - Actual Chunk Fast-Access-Pointer |
||
11 | |||
12 | 20 - Delta (0 Actual, 24 Next) |
||
13 | 24 - Next1 Chunk Event Pointer Delta |
||
14 | 28 - Next1 Chunk Mask |
||
15 | 32 - Next1 Chunk Start |
||
16 | 36 - Next1 Chunk Flags |
||
17 | 40 - Next1 Chunk Fast-Access-Pointer |
||
18 | |||
19 | 44 - Delta |
||
20 | |||
21 | */ |
||
22 | |||
23 | void FTrace_safe_ipoint(DWORD type, DWORD par1, DOWRD par2) |
||
24 | { |
||
25 | |||
26 | extern BYTE OSD_pointers[FTRACE_OSD_CHUNK_HEAD]; |
||
27 | extern BYTE FTrace_enable; |
||
28 | |||
29 | |||
30 | } |
||
31 | |||
32 | void FTrace_unsafe_ipoint(DWORD type, DWORD par1, DWORD par2) |
||
33 | { |
||
34 | |||
35 | extern BYTE OSD_pointers[FTRACE_OSD_CHUNK_HEAD]; |
||
36 | |||
37 | __asm__("pushfl\n\t" /* Critical Section */ |
||
38 | "cli\n\t" |
||
39 | "cpuid\n\t" |
||
40 | "rdtsc\n\t" |
||
41 | "movl %%esi,(%%edi)\n\t" /* Save TYPE + WORD par2 */ |
||
42 | "movl %%edx,4(%%edi)\n\t" /* Save TSC HIGH */ |
||
43 | "movl %%eax,8(%%edi)\n\t" /* Save TSC LOW */ |
||
44 | "addl $12,(%%edi)\n\t" /* Inc Fast-Access-Pointer */ |
||
45 | "popfl\n\t" |
||
46 | :: "D" (*(DWORD * )(OSD_pointers+16)), "S" (type)); |
||
47 | |||
48 | } |
||
49 |