Rev 710 | Rev 1063 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
352 | giacomo | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Giacomo Guidi <giacomo@gandalf.sssup.it> |
||
10 | * |
||
11 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
12 | * |
||
13 | * http://www.sssup.it |
||
14 | * http://retis.sssup.it |
||
15 | * http://shark.sssup.it |
||
16 | */ |
||
17 | |||
18 | #ifndef __TRACER_H__ |
||
19 | #define __TRACER_H__ |
||
20 | |||
21 | #ifdef __OLD_TRACER__ |
||
22 | |||
23 | #include <ll/sys/types.h> |
||
24 | #include "types.h" |
||
25 | #include "trace.h" |
||
355 | giacomo | 26 | #include "FTrace.h" |
352 | giacomo | 27 | |
28 | #define TRACER_LOGEVENT oldtrace |
||
29 | |||
30 | extern int (*trc_register_eventclass) |
||
31 | (int class,int num,int(*func)(trc_event_t *, int event, void *ptr)); |
||
32 | |||
33 | extern void (*trc_logevent)(int event, void *ptr); |
||
34 | |||
35 | extern int (*trc_resume)(void); |
||
36 | extern int (*trc_suspend)(void); |
||
37 | |||
38 | #define NOT_DEFINED 0xFF |
||
39 | |||
710 | giacomo | 40 | extern __inline__ void oldtrace(WORD type, WORD par1, DWORD par2) |
352 | giacomo | 41 | { |
42 | |||
43 | static int oldtype; |
||
44 | static int oldpar; |
||
45 | extern BYTE conv[256]; // Conversion table: ctable.c |
||
46 | BYTE ttype = 0; |
||
47 | |||
710 | giacomo | 48 | ttype = type & 0x000F; |
49 | type = (type >> 4) & 0x000F; |
||
352 | giacomo | 50 | type |= (ttype << 4); |
51 | |||
52 | oldtype = conv[type]; |
||
53 | |||
710 | giacomo | 54 | oldpar = par1; |
55 | |||
352 | giacomo | 56 | if (oldtype != NOT_DEFINED) trc_logevent(oldtype,&oldpar); |
57 | |||
58 | } |
||
59 | |||
60 | |||
61 | #else |
||
62 | #ifdef __NEW_TRACER__ |
||
63 | |||
64 | #include <ll/sys/types.h> |
||
65 | #include <ll/i386/hw-instr.h> |
||
66 | #include "FTrace.h" |
||
497 | giacomo | 67 | #include "FTrace_chunk.h" |
68 | #include "FTrace_OSD.h" |
||
907 | mauro | 69 | #include "FTrace_udp.h" |
352 | giacomo | 70 | |
497 | giacomo | 71 | #define TRACER_NO_OUTPUT 0x00 |
72 | #define TRACER_UDP_OUTPUT 0x01 |
||
364 | giacomo | 73 | |
497 | giacomo | 74 | #define TRACER_LOGEVENT FTrace_safe_ipoint |
75 | #define FAST_TRACER_LOGEVENT FTrace_unsafe_ipoint |
||
352 | giacomo | 76 | |
502 | giacomo | 77 | void FTrace_unsafe_ipoint(WORD type, WORD par1, DWORD par2); |
78 | void FTrace_safe_ipoint(WORD type, WORD par1, DWORD par2); |
||
362 | giacomo | 79 | |
352 | giacomo | 80 | #else |
81 | |||
399 | giacomo | 82 | #include "FTrace.h" |
83 | |||
527 | giacomo | 84 | #define TRACER_LOGEVENT(a,b,c) |
352 | giacomo | 85 | |
86 | #endif |
||
87 | |||
88 | #endif |
||
89 | |||
90 | #endif |