* | |->category (String, not yet implemented)
* | |->time (LttTime)
* | |->tsc (LttCycleCount --> uint64)
+ * | |->target_pid (target PID of the event)
* | |->fields
* | |->"facility_name
* | |->"event name"
* event.category
* event.time
* event.tsc
+ * event.target_pid
* event.field
*/
g_string_free(f,TRUE);
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);
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;
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;
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;
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