#include <babeltrace2/babeltrace.h>
#include "compat/bitfield.h"
#include "common/common.h"
+#include "common/uuid.h"
#include "compat/time.h"
#include "common/assert.h"
#include <inttypes.h>
bool print_names = pretty->options.print_header_field_names;
int ret = 0;
const bt_event_class *event_class = NULL;
- const bt_stream_class *stream_class = NULL;
- const bt_trace_class *trace_class = NULL;
const bt_packet *packet = NULL;
const bt_stream *stream = NULL;
const bt_trace *trace = NULL;
bt_property_availability prop_avail;
event_class = bt_event_borrow_class_const(event);
- stream_class = bt_event_class_borrow_stream_class_const(event_class);
- trace_class = bt_stream_class_borrow_trace_class_const(stream_class);
packet = bt_event_borrow_packet_const(event);
stream = bt_packet_borrow_stream_const(packet);
trace = bt_stream_borrow_trace_const(stream);
if (pretty->options.print_trace_hostname_field) {
const bt_value *hostname_str;
- hostname_str = bt_trace_class_borrow_environment_entry_value_by_name_const(
- trace_class, "hostname");
+ hostname_str = bt_trace_borrow_environment_entry_value_by_name_const(
+ trace, "hostname");
if (hostname_str) {
const char *str;
if (pretty->options.print_trace_domain_field) {
const bt_value *domain_str;
- domain_str = bt_trace_class_borrow_environment_entry_value_by_name_const(
- trace_class, "domain");
+ domain_str = bt_trace_borrow_environment_entry_value_by_name_const(
+ trace, "domain");
if (domain_str) {
const char *str;
if (pretty->options.print_trace_procname_field) {
const bt_value *procname_str;
- procname_str = bt_trace_class_borrow_environment_entry_value_by_name_const(
- trace_class, "procname");
+ procname_str = bt_trace_borrow_environment_entry_value_by_name_const(
+ trace, "procname");
if (procname_str) {
const char *str;
if (pretty->options.print_trace_vpid_field) {
const bt_value *vpid_value;
- vpid_value = bt_trace_class_borrow_environment_entry_value_by_name_const(
- trace_class, "vpid");
+ vpid_value = bt_trace_borrow_environment_entry_value_by_name_const(
+ trace, "vpid");
if (vpid_value) {
int64_t value;
}
/* Trace UUID */
- trace_uuid = bt_trace_class_get_uuid(
- bt_trace_borrow_class_const(trace));
+ trace_uuid = bt_trace_get_uuid(trace);
/* Format message */
g_string_assign(pretty->string, "");
if (trace_uuid) {
g_string_append_printf(pretty->string,
- "(UUID: %02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x) ",
- trace_uuid[0],
- trace_uuid[1],
- trace_uuid[2],
- trace_uuid[3],
- trace_uuid[4],
- trace_uuid[5],
- trace_uuid[6],
- trace_uuid[7],
- trace_uuid[8],
- trace_uuid[9],
- trace_uuid[10],
- trace_uuid[11],
- trace_uuid[12],
- trace_uuid[13],
- trace_uuid[14],
- trace_uuid[15]);
+ "(UUID: " BT_UUID_FMT ") ",
+ BT_UUID_FMT_VALUES(trace_uuid));
} else {
g_string_append(pretty->string, "(no UUID) ");
}