projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
correct statedump end
[lttv.git]
/
ltt
/
branches
/
poly
/
lttv
/
lttv
/
filter.c
diff --git
a/ltt/branches/poly/lttv/lttv/filter.c
b/ltt/branches/poly/lttv/lttv/filter.c
index efe6bd64a0876939949f87e9a78a6108a58f86d9..8ebeb1d62a55b6b3777653eaa1c38767d6c1db1a 100644
(file)
--- a/
ltt/branches/poly/lttv/lttv/filter.c
+++ b/
ltt/branches/poly/lttv/lttv/filter.c
@@
-35,6
+35,7
@@
* | |->category (String, not yet implemented)
* | |->time (LttTime)
* | |->tsc (LttCycleCount --> uint64)
* | |->category (String, not yet implemented)
* | |->time (LttTime)
* | |->tsc (LttCycleCount --> uint64)
+ * | |->target_pid (target PID of the event)
* | |->fields
* | |->"facility_name
* | |->"event name"
* | |->fields
* | |->"facility_name
* | |->"event name"
@@
-210,6
+211,7
@@
lttv_simple_expression_assign_field(GPtrArray* fp, LttvSimpleExpression* se) {
* event.category
* event.time
* event.tsc
* event.category
* event.time
* event.tsc
+ * event.target_pid
* event.field
*/
g_string_free(f,TRUE);
* event.field
*/
g_string_free(f,TRUE);
@@
-232,6
+234,9
@@
lttv_simple_expression_assign_field(GPtrArray* fp, LttvSimpleExpression* se) {
else if(!g_strcasecmp(f->str,"tsc") ) {
se->field = LTTV_FILTER_EVENT_TSC;
}
else if(!g_strcasecmp(f->str,"tsc") ) {
se->field = LTTV_FILTER_EVENT_TSC;
}
+ else if(!g_strcasecmp(f->str,"target_pid") ) {
+ se->field = LTTV_FILTER_EVENT_TARGET_PID;
+ }
else if(!g_strcasecmp(f->str,"field") ) {
se->field = LTTV_FILTER_EVENT_FIELD;
g_string_free(f,TRUE);
else if(!g_strcasecmp(f->str,"field") ) {
se->field = LTTV_FILTER_EVENT_FIELD;
g_string_free(f,TRUE);
@@
-333,6
+338,7
@@
lttv_simple_expression_assign_operator(LttvSimpleExpression* se, LttvExpressionO
case LTTV_FILTER_STATE_CPU:
case LTTV_FILTER_STATE_PID:
case LTTV_FILTER_STATE_PPID:
case LTTV_FILTER_STATE_CPU:
case LTTV_FILTER_STATE_PID:
case LTTV_FILTER_STATE_PPID:
+ case LTTV_FILTER_EVENT_TARGET_PID:
switch(op) {
case LTTV_FIELD_EQ:
se->op = lttv_apply_op_eq_uint;
switch(op) {
case LTTV_FIELD_EQ:
se->op = lttv_apply_op_eq_uint;
@@
-466,6
+472,7
@@
lttv_simple_expression_assign_value(LttvSimpleExpression* se, char* value) {
case LTTV_FILTER_STATE_PID:
case LTTV_FILTER_STATE_PPID:
case LTTV_FILTER_STATE_CPU:
case LTTV_FILTER_STATE_PID:
case LTTV_FILTER_STATE_PPID:
case LTTV_FILTER_STATE_CPU:
+ case LTTV_FILTER_EVENT_TARGET_PID:
se->value.v_uint = atoi(value);
g_free(value);
break;
se->value.v_uint = atoi(value);
g_free(value);
break;
@@
-572,6
+579,7
@@
lttv_struct_type(gint ft) {
case LTTV_FILTER_EVENT_CATEGORY:
case LTTV_FILTER_EVENT_TIME:
case LTTV_FILTER_EVENT_TSC:
case LTTV_FILTER_EVENT_CATEGORY:
case LTTV_FILTER_EVENT_TIME:
case LTTV_FILTER_EVENT_TSC:
+ case LTTV_FILTER_EVENT_TARGET_PID:
case LTTV_FILTER_EVENT_FIELD:
return LTTV_FILTER_EVENT;
break;
case LTTV_FILTER_EVENT_FIELD:
return LTTV_FILTER_EVENT;
break;
@@
-1987,7
+1995,7
@@
lttv_filter_tree_parse_branch(
return se->op((gpointer)&quark,v);
}
break;
return se->op((gpointer)&quark,v);
}
break;
- case LTTV_FILTER_STATE_T_BRAND:
+
case LTTV_FILTER_STATE_T_BRAND:
if(state == NULL) return TRUE;
else {
GQuark quark = state->brand;
if(state == NULL) return TRUE;
else {
GQuark quark = state->brand;
@@
-2051,6
+2059,14
@@
lttv_filter_tree_parse_branch(
return se->op((gpointer)&count,v);
}
break;
return se->op((gpointer)&count,v);
}
break;
+ case LTTV_FILTER_EVENT_TARGET_PID:
+ if(context == NULL) return TRUE;
+ else {
+ guint target_pid =
+ lttv_state_get_target_pid((LttvTracefileState*)context);
+ return se->op((gpointer)&target_pid,v);
+ }
+ break;
case LTTV_FILTER_EVENT_FIELD:
/*
* TODO: Use the offset to
case LTTV_FILTER_EVENT_FIELD:
/*
* TODO: Use the offset to
This page took
0.024114 seconds
and
4
git commands to generate.