Rev 501 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#include <FTrace_types.h>
#include <FTrace_OSD.h>
/* OSD_pointers
00 - Actual Chunk Event Pointer Delta
04 - Actual Chunk Mask
08 - Actual Chunk Start
12 - Actual Chunk Flags
16 - Actual Chunk Fast-Access-Pointer
20 - Delta (0 Actual, 24 Next)
24 - Next1 Chunk Event Pointer Delta
28 - Next1 Chunk Mask
32 - Next1 Chunk Start
36 - Next1 Chunk Flags
40 - Next1 Chunk Fast-Access-Pointer
44 - Delta
*/
void FTrace_safe_ipoint(DWORD type, DWORD par1, DOWRD par2)
{
extern BYTE OSD_pointers[FTRACE_OSD_CHUNK_HEAD];
extern BYTE FTrace_enable;
}
void FTrace_unsafe_ipoint(DWORD type, DWORD par1, DWORD par2)
{
extern BYTE OSD_pointers[FTRACE_OSD_CHUNK_HEAD];
__asm__("pushfl\n\t" /* Critical Section */
"cli\n\t"
"cpuid\n\t"
"rdtsc\n\t"
"movl %%esi,(%%edi)\n\t" /* Save TYPE + WORD par2 */
"movl %%edx,4(%%edi)\n\t" /* Save TSC HIGH */
"movl %%eax,8(%%edi)\n\t" /* Save TSC LOW */
"addl $12,(%%edi)\n\t" /* Inc Fast-Access-Pointer */
"popfl\n\t"
:: "D" (*(DWORD * )(OSD_pointers+16)), "S" (type));
}