projects
/
lttv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cc5ce8a
)
fine tune per architecture facilities
author
compudj
<compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sun, 18 Dec 2005 06:49:50 +0000
(06:49 +0000)
committer
compudj
<compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sun, 18 Dec 2005 06:49:50 +0000
(06:49 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1439
04897980
-b3bd-0310-b5e0-
8ef037075253
ltt/branches/poly/facilities/Makefile.am
patch
|
blob
|
blame
|
history
ltt/branches/poly/ltt/ltt.h
patch
|
blob
|
blame
|
history
ltt/branches/poly/ltt/parser.c
patch
|
blob
|
blame
|
history
ltt/branches/poly/ltt/parser.h
patch
|
blob
|
blame
|
history
ltt/branches/poly/ltt/tracefile.c
patch
|
blob
|
blame
|
history
ltt/branches/poly/lttv/lttv/state.c
patch
|
blob
|
blame
|
history
ltt/branches/poly/lttv/lttv/state.h
patch
|
blob
|
blame
|
history
ltt/branches/poly/lttv/lttv/stats.c
patch
|
blob
|
blame
|
history
ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c
patch
|
blob
|
blame
|
history
diff --git
a/ltt/branches/poly/facilities/Makefile.am
b/ltt/branches/poly/facilities/Makefile.am
index 36521458452402c3213243ec99639d547ad6541e..3a878f1d0838ca972e28629452ce295d5a0646cd 100644
(file)
--- a/
ltt/branches/poly/facilities/Makefile.am
+++ b/
ltt/branches/poly/facilities/Makefile.am
@@
-3,8
+3,8
@@
EXTRA_DIST = \
core.xml \
fs.xml \
ipc.xml \
core.xml \
fs.xml \
ipc.xml \
-asm_i386_kernel.xml \
kernel.xml \
kernel.xml \
+kernel_arch_i386.xml \
memory.xml \
network.xml \
process.xml \
memory.xml \
network.xml \
process.xml \
@@
-16,8
+16,8
@@
facilities_DATA = \
core.xml \
fs.xml \
ipc.xml \
core.xml \
fs.xml \
ipc.xml \
-asm_i386_kernel.xml \
kernel.xml \
kernel.xml \
+kernel_arch_i386.xml \
memory.xml \
network.xml \
process.xml \
memory.xml \
network.xml \
process.xml \
diff --git
a/ltt/branches/poly/ltt/ltt.h
b/ltt/branches/poly/ltt/ltt.h
index e0c7a731e0ed1d4a20f46fe88afecba004d52d8e..ad1d42e957d11fb90888d31b918cb3e0782b0689 100644
(file)
--- a/
ltt/branches/poly/ltt/ltt.h
+++ b/
ltt/branches/poly/ltt/ltt.h
@@
-155,5
+155,21
@@
typedef enum _LttTypeEnum
LTT_UNION,
LTT_NONE
} LttTypeEnum;
LTT_UNION,
LTT_NONE
} LttTypeEnum;
-
+
+
+/* Architecture types */
+#define LTT_ARCH_TYPE_I386 1
+#define LTT_ARCH_TYPE_PPC 2
+#define LTT_ARCH_TYPE_SH 3
+#define LTT_ARCH_TYPE_S390 4
+#define LTT_ARCH_TYPE_MIPS 5
+#define LTT_ARCH_TYPE_ARM 6
+#define LTT_ARCH_TYPE_PPC64 7
+#define LTT_ARCH_TYPE_X86_64 8
+
+/* Standard definitions for variants */
+#define LTT_ARCH_VARIANT_NONE 0 /* Main architecture implementation */
+
+
+
#endif // LTT_H
#endif // LTT_H
diff --git
a/ltt/branches/poly/ltt/parser.c
b/ltt/branches/poly/ltt/parser.c
index b8f2a6a2fc03d924847d5dda9d045c8f0c873f2b..6dbf402d76fd4f008f8d8c5cce17378df0617b15 100644
(file)
--- a/
ltt/branches/poly/ltt/parser.c
+++ b/
ltt/branches/poly/ltt/parser.c
@@
-267,6
+267,7
@@
void getFacilityAttributes(parse_file_t *in, facility_t *fac)
char car;
fac->name = NULL;
char car;
fac->name = NULL;
+ fac->arch = NULL;
while(1) {
token = getToken(in);
while(1) {
token = getToken(in);
@@
-281,7
+282,12
@@
void getFacilityAttributes(parse_file_t *in, facility_t *fac)
if(car == EOF) in->error(in,"name was expected");
else if(car == '\"') fac->name = allocAndCopy(getQuotedString(in));
else fac->name = allocAndCopy(getName(in));
if(car == EOF) in->error(in,"name was expected");
else if(car == '\"') fac->name = allocAndCopy(getQuotedString(in));
else fac->name = allocAndCopy(getName(in));
- }
+ } else if(!strcmp("arch", token)) {
+ getEqual(in);
+ car = seekNextChar(in);
+ if(car == '\"') fac->name = allocAndCopy(getQuotedString(in));
+ else fac->arch = allocAndCopy(getName(in));
+ }
}
}
}
}
@@
-420,7
+426,7
@@
void parseFacility(parse_file_t *in, facility_t * fac)
getFacilityAttributes(in, fac);
if(fac->name == NULL) in->error(in, "Attribute not named");
getFacilityAttributes(in, fac);
if(fac->name == NULL) in->error(in, "Attribute not named");
-
+
fac->capname = allocAndCopy(fac->name);
strupper(fac->capname);
getRAnglebracket(in);
fac->capname = allocAndCopy(fac->name);
strupper(fac->capname);
getRAnglebracket(in);
@@
-1551,5
+1557,3
@@
char *appendString(char *s, char *suffix)
strcat(tmp,suffix);
return tmp;
}
strcat(tmp,suffix);
return tmp;
}
-
-
diff --git
a/ltt/branches/poly/ltt/parser.h
b/ltt/branches/poly/ltt/parser.h
index 21884fb6d0b82d35f44bd4cc12ee19e5f3e7a799..4215f286cd82077ad90b90df4a49ed305d88c345 100644
(file)
--- a/
ltt/branches/poly/ltt/parser.h
+++ b/
ltt/branches/poly/ltt/parser.h
@@
-137,6
+137,7
@@
typedef struct _event {
typedef struct _facility {
char * name;
char * capname;
typedef struct _facility {
char * name;
char * capname;
+ char * arch;
char * description;
sequence_t events;
sequence_t unnamed_types; //FIXME : remove
char * description;
sequence_t events;
sequence_t unnamed_types; //FIXME : remove
diff --git
a/ltt/branches/poly/ltt/tracefile.c
b/ltt/branches/poly/ltt/tracefile.c
index 5fbf53cb32fc2d1842b291787ef115d4068da5a8..e7e213dc9d843b2dfd28d7f2ce9c57d30ee4d7a9 100644
(file)
--- a/
ltt/branches/poly/ltt/tracefile.c
+++ b/
ltt/branches/poly/ltt/tracefile.c
@@
-858,6
+858,8
@@
static int ltt_get_facility_description(LttFacility *f,
const gchar *text;
guint textlen;
gint err;
const gchar *text;
guint textlen;
gint err;
+ gint arch_spec;
+ gint fac_name_len;
text = g_quark_to_string(t->pathname);
textlen = strlen(text);
text = g_quark_to_string(t->pathname);
textlen = strlen(text);
@@
-871,9
+873,21
@@
static int ltt_get_facility_description(LttFacility *f,
strcat(desc_file_name, text);
text = g_quark_to_string(f->name);
strcat(desc_file_name, text);
text = g_quark_to_string(f->name);
- textlen+=strlen(text);
+ fac_name_len = strlen(text);
+ textlen+=fac_name_len;
if(textlen >= PATH_MAX) goto name_error;
strcat(desc_file_name, text);
if(textlen >= PATH_MAX) goto name_error;
strcat(desc_file_name, text);
+
+ /* arch specific facilities are named like this : name_arch */
+ if(fac_name_len+1 < sizeof("_arch"))
+ arch_spec = 0;
+ else {
+ if(!strcmp(&text[fac_name_len+1-sizeof("_arch")], "_arch"))
+ arch_spec = 1;
+ else
+ arch_spec = 0;
+ }
+
#if 0
text = "_";
textlen+=strlen(text);
#if 0
text = "_";
textlen+=strlen(text);
@@
-887,6
+901,39
@@
static int ltt_get_facility_description(LttFacility *f,
textlen=strlen(desc_file_name);
#endif //0
textlen=strlen(desc_file_name);
#endif //0
+
+ if(arch_spec) {
+ switch(t->arch_type) {
+ case LTT_ARCH_TYPE_I386:
+ text = "_i386";
+ break;
+ case LTT_ARCH_TYPE_PPC:
+ text = "_ppc";
+ break;
+ case LTT_ARCH_TYPE_SH:
+ text = "_sh";
+ break;
+ case LTT_ARCH_TYPE_S390:
+ text = "_s390";
+ break;
+ case LTT_ARCH_TYPE_MIPS:
+ text = "_mips";
+ break;
+ case LTT_ARCH_TYPE_ARM:
+ text = "_arm";
+ case LTT_ARCH_TYPE_PPC64:
+ text = "_ppc64";
+ case LTT_ARCH_TYPE_X86_64:
+ text = "_x86_64";
+ break;
+ default:
+ g_error("Trace from unsupported architecture.");
+ }
+ textlen+=strlen(text);
+ if(textlen >= PATH_MAX) goto name_error;
+ strcat(desc_file_name, text);
+ }
+
text = ".xml";
textlen+=strlen(text);
if(textlen >= PATH_MAX) goto name_error;
text = ".xml";
textlen+=strlen(text);
if(textlen >= PATH_MAX) goto name_error;
diff --git
a/ltt/branches/poly/lttv/lttv/state.c
b/ltt/branches/poly/lttv/lttv/state.c
index d3879f76a8635144761d47688b1c635e81ecc4cb..18d21fde159688115236bc06360ee53a645a2ff4 100644
(file)
--- a/
ltt/branches/poly/lttv/lttv/state.c
+++ b/
ltt/branches/poly/lttv/lttv/state.c
@@
-35,7
+35,7
@@
GQuark
LTT_FACILITY_KERNEL,
GQuark
LTT_FACILITY_KERNEL,
- LTT_FACILITY_
ASM_I386_KERNEL
,
+ LTT_FACILITY_
KERNEL_ARCH
,
LTT_FACILITY_PROCESS,
LTT_FACILITY_FS;
LTT_FACILITY_PROCESS,
LTT_FACILITY_FS;
@@
-769,7
+769,7
@@
create_name_tables(LttvTraceState *tcs)
}
#endif //0
if(lttv_trace_find_hook(tcs->parent.t,
}
#endif //0
if(lttv_trace_find_hook(tcs->parent.t,
- LTT_FACILITY_
ASM_I386_KERNEL
, LTT_EVENT_SYSCALL_ENTRY,
+ LTT_FACILITY_
KERNEL_ARCH
, LTT_EVENT_SYSCALL_ENTRY,
LTT_FIELD_SYSCALL_ID, 0, 0,
NULL, NULL, &h))
return;
LTT_FIELD_SYSCALL_ID, 0, 0,
NULL, NULL, &h))
return;
@@
-1435,13
+1435,13
@@
void lttv_state_add_event_hooks(LttvTracesetState *self)
hooks = g_array_set_size(hooks, 11);
ret = lttv_trace_find_hook(ts->parent.t,
hooks = g_array_set_size(hooks, 11);
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_
ASM_I386_KERNEL
, LTT_EVENT_SYSCALL_ENTRY,
+ LTT_FACILITY_
KERNEL_ARCH
, LTT_EVENT_SYSCALL_ENTRY,
LTT_FIELD_SYSCALL_ID, 0, 0,
syscall_entry, NULL, &g_array_index(hooks, LttvTraceHook, 0));
g_assert(!ret);
ret = lttv_trace_find_hook(ts->parent.t,
LTT_FIELD_SYSCALL_ID, 0, 0,
syscall_entry, NULL, &g_array_index(hooks, LttvTraceHook, 0));
g_assert(!ret);
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_
ASM_I386_KERNEL
, LTT_EVENT_SYSCALL_EXIT,
+ LTT_FACILITY_
KERNEL_ARCH
, LTT_EVENT_SYSCALL_EXIT,
0, 0, 0,
syscall_exit, NULL, &g_array_index(hooks, LttvTraceHook, 1));
g_assert(!ret);
0, 0, 0,
syscall_exit, NULL, &g_array_index(hooks, LttvTraceHook, 1));
g_assert(!ret);
@@
-2153,7
+2153,7
@@
static void module_init()
LTT_FACILITY_KERNEL = g_quark_from_string("kernel");
LTT_FACILITY_KERNEL = g_quark_from_string("kernel");
- LTT_FACILITY_
ASM_I386_KERNEL = g_quark_from_string("asm_i386_kernel
");
+ LTT_FACILITY_
KERNEL_ARCH = g_quark_from_string("kernel_arch
");
LTT_FACILITY_PROCESS = g_quark_from_string("process");
LTT_FACILITY_FS = g_quark_from_string("fs");
LTT_FACILITY_PROCESS = g_quark_from_string("process");
LTT_FACILITY_FS = g_quark_from_string("fs");
diff --git
a/ltt/branches/poly/lttv/lttv/state.h
b/ltt/branches/poly/lttv/lttv/state.h
index c6a373ab87cd51804c9de38f078decd419e58954..de8d36b8a8557669290e9bf4bb90ee89a7b018f6 100644
(file)
--- a/
ltt/branches/poly/lttv/lttv/state.h
+++ b/
ltt/branches/poly/lttv/lttv/state.h
@@
-57,7
+57,7
@@
extern GQuark
LTT_FACILITY_KERNEL,
extern GQuark
LTT_FACILITY_KERNEL,
- LTT_FACILITY_
ASM_I386_KERNEL
,
+ LTT_FACILITY_
KERNEL_ARCH
,
LTT_FACILITY_PROCESS,
LTT_FACILITY_FS;
LTT_FACILITY_PROCESS,
LTT_FACILITY_FS;
diff --git
a/ltt/branches/poly/lttv/lttv/stats.c
b/ltt/branches/poly/lttv/lttv/stats.c
index d4321bce7ed80c4b955b3e442c68993e355195a0..23a9cca8481b0848f17bc0855fdc068d4be3aa73 100644
(file)
--- a/
ltt/branches/poly/lttv/lttv/stats.c
+++ b/
ltt/branches/poly/lttv/lttv/stats.c
@@
-808,14
+808,14
@@
void lttv_stats_add_event_hooks(LttvTracesetStats *self)
g_array_set_size(hooks, 7);
ret = lttv_trace_find_hook(ts->parent.parent.t,
g_array_set_size(hooks, 7);
ret = lttv_trace_find_hook(ts->parent.parent.t,
- LTT_FACILITY_
ASM_I386_KERNEL
, LTT_EVENT_SYSCALL_ENTRY,
+ LTT_FACILITY_
KERNEL_ARCH
, LTT_EVENT_SYSCALL_ENTRY,
LTT_FIELD_SYSCALL_ID, 0, 0,
before_syscall_entry, NULL,
&g_array_index(hooks, LttvTraceHook, 0));
g_assert(!ret);
ret = lttv_trace_find_hook(ts->parent.parent.t,
LTT_FIELD_SYSCALL_ID, 0, 0,
before_syscall_entry, NULL,
&g_array_index(hooks, LttvTraceHook, 0));
g_assert(!ret);
ret = lttv_trace_find_hook(ts->parent.parent.t,
- LTT_FACILITY_
ASM_I386_KERNEL
, LTT_EVENT_SYSCALL_EXIT,
+ LTT_FACILITY_
KERNEL_ARCH
, LTT_EVENT_SYSCALL_EXIT,
0, 0, 0,
before_syscall_exit, NULL,
&g_array_index(hooks, LttvTraceHook, 1));
0, 0, 0,
before_syscall_exit, NULL,
&g_array_index(hooks, LttvTraceHook, 1));
@@
-862,14
+862,14
@@
void lttv_stats_add_event_hooks(LttvTracesetStats *self)
g_array_set_size(hooks, 9);
ret = lttv_trace_find_hook(ts->parent.parent.t,
g_array_set_size(hooks, 9);
ret = lttv_trace_find_hook(ts->parent.parent.t,
- LTT_FACILITY_
ASM_I386_KERNEL
, LTT_EVENT_SYSCALL_ENTRY,
+ LTT_FACILITY_
KERNEL_ARCH
, LTT_EVENT_SYSCALL_ENTRY,
LTT_FIELD_SYSCALL_ID, 0, 0,
after_syscall_entry, NULL,
&g_array_index(hooks, LttvTraceHook, 0));
g_assert(!ret);
ret = lttv_trace_find_hook(ts->parent.parent.t,
LTT_FIELD_SYSCALL_ID, 0, 0,
after_syscall_entry, NULL,
&g_array_index(hooks, LttvTraceHook, 0));
g_assert(!ret);
ret = lttv_trace_find_hook(ts->parent.parent.t,
- LTT_FACILITY_
ASM_I386_KERNEL
, LTT_EVENT_SYSCALL_EXIT,
+ LTT_FACILITY_
KERNEL_ARCH
, LTT_EVENT_SYSCALL_EXIT,
0, 0, 0,
after_syscall_exit, NULL,
&g_array_index(hooks, LttvTraceHook, 1));
0, 0, 0,
after_syscall_exit, NULL,
&g_array_index(hooks, LttvTraceHook, 1));
diff --git
a/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c
b/ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c
index b22931d69a8cd5e7de9fe7560d979ef965fd42b9..b461e8a46c22b077cd2a5ff4a87a4568dacd39db 100644
(file)
--- a/
ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c
+++ b/
ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c
@@
-224,7
+224,7
@@
void drawing_data_request(Drawing_t *drawing,
/* before hooks */
ret = lttv_trace_find_hook(ts->parent.t,
/* before hooks */
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_
ASM_I386_KERNEL
, LTT_EVENT_SYSCALL_ENTRY,
+ LTT_FACILITY_
KERNEL_ARCH
, LTT_EVENT_SYSCALL_ENTRY,
LTT_FIELD_SYSCALL_ID, 0, 0,
before_execmode_hook,
events_request,
LTT_FIELD_SYSCALL_ID, 0, 0,
before_execmode_hook,
events_request,
@@
-232,7
+232,7
@@
void drawing_data_request(Drawing_t *drawing,
g_assert(!ret);
ret = lttv_trace_find_hook(ts->parent.t,
g_assert(!ret);
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_
ASM_I386_KERNEL
, LTT_EVENT_SYSCALL_EXIT,
+ LTT_FACILITY_
KERNEL_ARCH
, LTT_EVENT_SYSCALL_EXIT,
0, 0, 0,
before_execmode_hook,
events_request,
0, 0, 0,
before_execmode_hook,
events_request,
This page took
0.030494 seconds
and
4
git commands to generate.