Rev 1290 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1286 | 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 | /* |
||
19 | * Copyright (C) 2000 Paolo Gai |
||
20 | * |
||
21 | * This program is free software; you can redistribute it and/or modify |
||
22 | * it under the terms of the GNU General Public License as published by |
||
23 | * the Free Software Foundation; either version 2 of the License, or |
||
24 | * (at your option) any later version. |
||
25 | * |
||
26 | * This program is distributed in the hope that it will be useful, |
||
27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
29 | * GNU General Public License for more details. |
||
30 | * |
||
31 | * You should have received a copy of the GNU General Public License |
||
32 | * along with this program; if not, write to the Free Software |
||
33 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
34 | */ |
||
35 | |||
36 | #include <kernel/kern.h> |
||
37 | #include <tracer.h> |
||
38 | |||
39 | int main(int argc, char **argv) |
||
40 | { |
||
41 | |||
42 | long long i; |
||
1289 | giacomo | 43 | int err; |
1286 | giacomo | 44 | |
1290 | giacomo | 45 | tracer_initialize(100000); |
46 | err = init_udp_tracer("192.168.82.46","192.168.82.20"); |
||
1286 | giacomo | 47 | |
1289 | giacomo | 48 | if (err != 0) { |
49 | cprintf("Network Open Fail !\n"); |
||
50 | sys_end(); |
||
1290 | giacomo | 51 | } |
1289 | giacomo | 52 | |
1286 | giacomo | 53 | tracer_enable(); |
54 | |||
55 | for (i=0;i<100000000;i++); |
||
56 | |||
57 | tracer_disable(); |
||
58 | |||
59 | tracer_print_statistics(); |
||
60 | |||
1290 | giacomo | 61 | tracer_send_logged_events(-1); |
1291 | giacomo | 62 | tracer_flush_sent_events(); |
1289 | giacomo | 63 | |
1291 | giacomo | 64 | // Ctrl-C to exit |
1290 | giacomo | 65 | while(1); |
66 | |||
1286 | giacomo | 67 | return 0; |
68 | |||
69 | } |