* Babeltrace CTF Text Output Plugin
*
* Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ * Copyright 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
*
"field-trace:vpid",
"field-loglevel",
"field-emf",
- "field-callsite",
-};
-
-static
-const char *loglevel_str [] = {
- [LOGLEVEL_EMERG] = "TRACE_EMERG",
- [LOGLEVEL_ALERT] = "TRACE_ALERT",
- [LOGLEVEL_CRIT] = "TRACE_CRIT",
- [LOGLEVEL_ERR] = "TRACE_ERR",
- [LOGLEVEL_WARNING] = "TRACE_WARNING",
- [LOGLEVEL_NOTICE] = "TRACE_NOTICE",
- [LOGLEVEL_INFO] = "TRACE_INFO",
- [LOGLEVEL_DEBUG_SYSTEM] = "TRACE_DEBUG_SYSTEM",
- [LOGLEVEL_DEBUG_PROGRAM] = "TRACE_DEBUG_PROGRAM",
- [LOGLEVEL_DEBUG_PROCESS] = "TRACE_DEBUG_PROCESS",
- [LOGLEVEL_DEBUG_MODULE] = "TRACE_DEBUG_MODULE",
- [LOGLEVEL_DEBUG_UNIT] = "TRACE_DEBUG_UNIT",
- [LOGLEVEL_DEBUG_FUNCTION] = "TRACE_DEBUG_FUNCTION",
- [LOGLEVEL_DEBUG_LINE] = "TRACE_DEBUG_LINE",
- [LOGLEVEL_DEBUG] = "TRACE_DEBUG",
};
static
text->options.print_loglevel_field = false;
text->options.print_emf_field = false;
text->options.print_emf_field = false;
- text->options.print_callsite_field = false;
break;
case TEXT_DEFAULT_SHOW:
text->options.print_trace_field = true;
text->options.print_loglevel_field = true;
text->options.print_emf_field = true;
text->options.print_emf_field = true;
- text->options.print_callsite_field = true;
break;
case TEXT_DEFAULT_HIDE:
text->options.print_trace_field = false;
text->options.print_loglevel_field = false;
text->options.print_emf_field = false;
text->options.print_emf_field = false;
- text->options.print_callsite_field = false;
break;
default:
ret = BT_COMPONENT_STATUS_ERROR;
text->options.print_emf_field = value;
}
- value = false;
- found = false;
- ret = apply_one_bool("field-callsite", params, &value, &found);
- if (ret != BT_COMPONENT_STATUS_OK) {
- goto end;
- }
- if (found) {
- text->options.print_callsite_field = value;
- }
end:
bt_put(text->plugin_opt_map);
text->plugin_opt_map = NULL;
text->out = stdout;
text->err = stderr;
+ text->delta_cycles = -1ULL;
+ text->last_cycles_timestamp = -1ULL;
+
+ text->delta_real_timestamp = -1ULL;
+ text->last_real_timestamp = -1ULL;
+
ret = apply_params(text, params);
if (ret != BT_COMPONENT_STATUS_OK) {
goto error;