1,9 → 1,13 |
#include <FTrace_chunk.h> |
#include <FTrace_types.h> |
#include <FTrace_OSD.h> |
#include <FTrace.h> |
#include <tracer.h> |
|
//#define FTRACE_DEBUG |
#define FTRACE_DEBUG |
|
WORD FTrace_filter_mask = 0; |
|
/* Globals */ |
|
FTrace_Chunk_Ptr ChunkTable[MAX_CHUNK]; /* Chunk array */ |
30,6 → 34,23 |
|
} |
|
/** |
* Set the filter for a specific family of events. |
* Store the choice into the filter mask. |
* If status is 1 then enable the filter. |
* If status is 0 then disable the filter. |
*/ |
void FTrace_set_filter(BYTE filter, int status) { |
if (status) FTrace_filter_mask |= (0x01 << (filter & FTrace_family_mask)); |
if (!status) FTrace_filter_mask &= ~(0x01 << (filter & FTrace_family_mask)); |
|
#ifdef FTRACE_DEBUG |
printk("FTrace_set_filter: %x\n", FTrace_filter_mask); |
#endif |
|
TRACER_LOGEVENT(filter, status, 0); |
} |
|
/* Find a free slot in ChunkTable */ |
static int FTrace_find_free_slot() |
{ |