]> rtime.felk.cvut.cz Git - arc.git/blob - common/strace.c
Fee, changed type on for flag used to force garbage collection. Aborting job if memif...
[arc.git] / common / strace.c
1 /* -------------------------------- Arctic Core ------------------------------\r
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
3  *\r
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
5  *\r
6  * This source code is free software; you can redistribute it and/or modify it\r
7  * under the terms of the GNU General Public License version 2 as published by the\r
8  * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.\r
9  *\r
10  * This program is distributed in the hope that it will be useful, but\r
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\r
13  * for more details.\r
14  * -------------------------------- Arctic Core ------------------------------*/\r
15 /*\r
16  * strace.c\r
17  *\r
18  *  Created on: 2009-apr-19\r
19  *      Author: mahi\r
20  *\r
21  * System trace...\r
22  * Idea to trace\r
23  *\r
24  * Inspiration:\r
25  *   http://ltt.polymtl.ca/tracingwiki/index.php/TracingBook\r
26  *   http://developer.apple.com/tools/performance/optimizingwithsystemtrace.html\r
27  *   http://benno.id.au/docs/lttng_data_format.pml\r
28  */\r
29 \r
30 /*\r
31  * Channel\r
32  *\r
33  * ISR\r
34  * TASK\r
35  *\r
36  */\r
37 \r
38 typedef enum {\r
39         STRACE_CH_ISR = 1,\r
40         STRACE_CH_TASK = (1<<1),\r
41         STRACE_CH_KERNEL = (1<<2),\r
42 } strace_ch_t;\r
43 \r
44 typedef enum {\r
45         STRACE_EV_ISR_START,\r
46         STRACE_EV_ISR_STOP,\r
47         STRACE_EV_TASK_START,\r
48         STRACE_EV_TASK_STOP,\r
49 } strace_ev_t;\r
50 \r
51 \r
52 struct strace_attr_s {\r
53         strace_ch_t\r
54         /* A timestamp in some unit */\r
55         uint32_t timestamp;\r
56 };\r
57 \r
58 \r
59 /**\r
60  *\r
61  * @param ch channel to record\r
62  */\r
63 void strace( strace_ev_t event) {\r
64         switch( ch ) {\r
65         case STRACE_CH_ISR:\r
66                 break;\r
67         case STRACE_CH_TASK:\r
68                 break;\r
69         }\r
70 }\r
71 \r
72 /**\r
73  * Channels to use.\r
74  */\r
75 void strace_init( strace_ch_t ch ) {\r
76 \r
77 }\r
78 \r
79 void strace_print( void ) {\r
80 \r
81 }\r
82 \r
83 \r