Commit | Line | Data |
---|---|---|
ce0214a6 | 1 | /* This file is part of the Linux Trace Toolkit viewer |
2 | * Copyright (C) 2003-2004 Mathieu Desnoyers | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify | |
5 | * it under the terms of the GNU General Public License Version 2 as | |
6 | * published by the Free Software Foundation; | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
b9ce0bad YB |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
16 | * MA 02110-1301, USA. | |
ce0214a6 | 17 | */ |
fa2c4dbe | 18 | |
4e4d11b3 | 19 | #ifdef HAVE_CONFIG_H |
20 | #include <config.h> | |
21 | #endif | |
22 | ||
76a67e8a | 23 | #include <gtk/gtk.h> |
24 | #include <gdk/gdk.h> | |
40debf7b | 25 | #include <string.h> |
f0d936c0 | 26 | |
2a2fa4f0 | 27 | #include <lttv/lttv.h> |
2d262115 | 28 | #include <lttvwindow/lttvwindow.h> |
b21c82b6 | 29 | #include <lttv/state.h> |
f66eba62 | 30 | #include <lttv/hook.h> |
831a876d | 31 | |
d66666fe | 32 | #include "drawing.h" |
a43d67ba | 33 | #include "eventhooks.h" |
d66666fe | 34 | #include "cfv.h" |
6d5ed1c3 | 35 | |
36 | #define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format) | |
6d5ed1c3 | 37 | |
10a1069a | 38 | //FIXME |
0f090e21 | 39 | // fixed #define TRACE_NUMBER 0 |
0af21a59 | 40 | #define EXTRA_ALLOC 1024 // pixels |
41 | ||
10a1069a | 42 | |
9a1ec01b | 43 | #if 0 /* colors for two lines representation */ |
e800cf84 | 44 | GdkColor drawing_colors[NUM_COLORS] = |
45 | { /* Pixel, R, G, B */ | |
46 | { 0, 0, 0, 0 }, /* COL_BLACK */ | |
47 | { 0, 0xFFFF, 0xFFFF, 0xFFFF }, /* COL_WHITE */ | |
23093869 | 48 | { 0, 0x0FFF, 0xFFFF, 0xFFFF }, /* COL_WAIT_FORK : pale blue */ |
49 | { 0, 0xFFFF, 0xFFFF, 0x0000 }, /* COL_WAIT_CPU : yellow */ | |
dbd243b1 | 50 | { 0, 0xFFFF, 0xA000, 0xFCFF }, /* COL_EXIT : pale magenta */ |
23093869 | 51 | { 0, 0xFFFF, 0x0000, 0xFFFF }, /* COL_ZOMBIE : purple */ |
52 | { 0, 0xFFFF, 0x0000, 0x0000 }, /* COL_WAIT : red */ | |
53 | { 0, 0x0000, 0xFFFF, 0x0000 }, /* COL_RUN : green */ | |
54 | { 0, 0x8800, 0xFFFF, 0x8A00 }, /* COL_USER_MODE : pale green */ | |
55 | { 0, 0x09FF, 0x01FF, 0xFFFF }, /* COL_SYSCALL : blue */ | |
56 | { 0, 0xF900, 0x4200, 0xFF00 }, /* COL_TRAP : pale purple */ | |
57 | { 0, 0xFFFF, 0x5AFF, 0x01FF }, /* COL_IRQ : orange */ | |
58 | { 0, 0xFFFF, 0xFFFF, 0xFFFF } /* COL_MODE_UNKNOWN : white */ | |
59 | ||
e800cf84 | 60 | }; |
9a1ec01b | 61 | #endif //0 |
62 | ||
63 | ||
64 | GdkColor drawing_colors[NUM_COLORS] = | |
65 | { /* Pixel, R, G, B */ | |
66 | { 0, 0, 0, 0 }, /* COL_BLACK */ | |
67 | { 0, 0xFFFF, 0xFFFF, 0xFFFF }, /* COL_WHITE */ | |
68 | { 0, 0x0000, 0xFF00, 0x0000 }, /* COL_RUN_USER_MODE : green */ | |
69 | { 0, 0x0100, 0x9E00, 0xFFFF }, /* COL_RUN_SYSCALL : pale blue */ | |
70 | { 0, 0xFF00, 0xFF00, 0x0100 }, /* COL_RUN_TRAP : yellow */ | |
faf074a3 | 71 | { 0, 0xFFFF, 0x5E00, 0x0000 }, /* COL_RUN_IRQ : orange */ |
72 | { 0, 0xFFFF, 0x9400, 0x9600 }, /* COL_RUN_SOFT_IRQ : pink */ | |
2da61677 | 73 | { 0, 0x6600, 0x0000, 0x0000 }, /* COL_WAIT : dark red */ |
9a1ec01b | 74 | { 0, 0x7700, 0x7700, 0x0000 }, /* COL_WAIT_CPU : dark yellow */ |
75 | { 0, 0x6400, 0x0000, 0x5D00 }, /* COL_ZOMBIE : dark purple */ | |
76 | { 0, 0x0700, 0x6400, 0x0000 }, /* COL_WAIT_FORK : dark green */ | |
77 | { 0, 0x8900, 0x0000, 0x8400 }, /* COL_EXIT : "less dark" magenta */ | |
c7620c79 | 78 | { 0, 0x0000, 0x0000, 0x0000 }, /* COL_DEAD : black */ |
9a1ec01b | 79 | { 0, 0xFFFF, 0xFFFF, 0xFFFF }, /* COL_MODE_UNKNOWN : white */ |
80 | { 0, 0xFFFF, 0xFFFF, 0xFFFF } /* COL_UNNAMED : white */ | |
81 | ||
82 | }; | |
83 | ||
7893f726 | 84 | /* |
85 | RUN+USER MODE green | |
86 | RUN+SYSCALL | |
87 | RUN+TRAP | |
88 | RUN+IRQ |