projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
state.c: track softirq raises
[lttv.git]
/
ltt
/
branches
/
poly
/
lttv
/
lttv
/
tracecontext.c
diff --git
a/ltt/branches/poly/lttv/lttv/tracecontext.c
b/ltt/branches/poly/lttv/lttv/tracecontext.c
index 39ee2950b66c443350c6dafb23c7e5e309c543d6..f5b78b5cbfdd8d640fe6b91576b68d415c840010 100644
(file)
--- a/
ltt/branches/poly/lttv/lttv/tracecontext.c
+++ b/
ltt/branches/poly/lttv/lttv/tracecontext.c
@@
-686,7
+686,7
@@
void lttv_process_traceset_begin(LttvTracesetContext *self,
/* Note : a _middle must be preceded from a _seek or another middle */
guint lttv_process_traceset_middle(LttvTracesetContext *self,
LttTime end,
/* Note : a _middle must be preceded from a _seek or another middle */
guint lttv_process_traceset_middle(LttvTracesetContext *self,
LttTime end,
- gu
int
nb_events,
+ gu
long
nb_events,
const LttvTracesetContextPosition *end_position)
{
GTree *pqueue = self->pqueue;
const LttvTracesetContextPosition *end_position)
{
GTree *pqueue = self->pqueue;
@@
-862,9
+862,6
@@
void lttv_process_trace_seek_time(LttvTraceContext *self, LttTime start)
g_debug("test tree after seek_time");
g_tree_foreach(pqueue, test_tree, NULL);
#endif //DEBUG
g_debug("test tree after seek_time");
g_tree_foreach(pqueue, test_tree, NULL);
#endif //DEBUG
-
-
-
}
}
@@
-968,18
+965,20
@@
struct marker_info *lttv_trace_hook_get_marker(LttTrace *t, LttvTraceHook *th)
return marker_get_info_from_id(t, th->id);
}
return marker_get_info_from_id(t, th->id);
}
-
-int lttv_trace_find_hook(LttTrace *t, GQuark marker_name,
+int lttv_trace_find_hook(LttTrace *t, GQuark facility_name, GQuark event_name,
GQuark fields[], LttvHook h, gpointer hook_data, GArray **trace_hooks)
{
struct marker_info *info;
GQuark fields[], LttvHook h, gpointer hook_data, GArray **trace_hooks)
{
struct marker_info *info;
- struct marker_field *field;
guint16 marker_id;
int init_array_size;
guint16 marker_id;
int init_array_size;
+ GQuark marker_name;
+
+ marker_name = lttv_merge_facility_event_name(facility_name, event_name);
info = marker_get_info_from_name(t, marker_name);
if(unlikely(info == NULL)) {
info = marker_get_info_from_name(t, marker_name);
if(unlikely(info == NULL)) {
- return NULL;
+ g_warning("No marker of name %s found", g_quark_to_string(marker_name));
+ return 1;
}
init_array_size = (*trace_hooks)->len;
}
init_array_size = (*trace_hooks)->len;
@@
-988,7
+987,8
@@
int lttv_trace_find_hook(LttTrace *t, GQuark marker_name,
do {
LttvTraceHook tmpth;
int found;
do {
LttvTraceHook tmpth;
int found;
- GQuark f;
+ GQuark *f;
+ struct marker_field *marker_field;
marker_id = marker_get_id_from_info(t, info);
marker_id = marker_get_id_from_info(t, info);
@@
-998,10
+998,10
@@
int lttv_trace_find_hook(LttTrace *t, GQuark marker_name,
tmpth.fields = g_ptr_array_new();
/* for each field requested */
tmpth.fields = g_ptr_array_new();
/* for each field requested */
- for(f = fields; *f != 0; f++) {
+ for(f = fields;
f &&
*f != 0; f++) {
found = 0;
for_each_marker_field(marker_field, info) {
found = 0;
for_each_marker_field(marker_field, info) {
- if(marker_field
field
->name == *f) {
+ if(marker_field->name == *f) {
found = 1;
g_ptr_array_add(tmpth.fields, marker_field);
break;
found = 1;
g_ptr_array_add(tmpth.fields, marker_field);
break;
@@
-1024,16
+1024,22
@@
skip_marker:
} while(info != NULL);
/* Error if no new trace hook has been added */
} while(info != NULL);
/* Error if no new trace hook has been added */
- return (init_array_size == (*trace_hooks)->len);
+ if (init_array_size == (*trace_hooks)->len) {
+ g_warning("No marker of name %s has all requested fields",
+ g_quark_to_string(marker_name));
+ return 1;
+ }
+ return 0;
}
}
-void lttv_trace_hook_
destroy
(GArray **th)
+void lttv_trace_hook_
remove_all
(GArray **th)
{
int i;
{
int i;
- for(i=0; i<
th
->len; i++) {
- g_ptr_array_free(g_array_index(th, LttvTraceHook, i).fields, TRUE);
+ for(i=0; i<
(*th)
->len; i++) {
+ g_ptr_array_free(g_array_index(
*
th, LttvTraceHook, i).fields, TRUE);
}
}
- *th = g_array_remove_range(*th, 0, th->len);
+ if((*th)->len)
+ *th = g_array_remove_range(*th, 0, (*th)->len);
}
LttvTracesetContextPosition *lttv_traceset_context_position_new(
}
LttvTracesetContextPosition *lttv_traceset_context_position_new(
@@
-1556,6
+1562,7
@@
static gint seek_forward_event_hook(void *hook_data, void* call_data)
sd->event_count++;
if(sd->event_count >= sd->n)
return TRUE;
sd->event_count++;
if(sd->event_count >= sd->n)
return TRUE;
+ return FALSE;
}
/* Seek back n events forward from the current position (1 to n)
}
/* Seek back n events forward from the current position (1 to n)
This page took
0.036878 seconds
and
4
git commands to generate.