"Show callgraph from reference event"),
OPT_INTEGER(0, "socket-filter", &report.socket_filter,
"only show processor socket that match with this filter"),
+ OPT_BOOLEAN(0, "raw-trace", &symbol_conf.raw_trace,
+ "Show raw trace event output (do not use print fmt or plugins)"),
OPT_END()
};
struct perf_data_file file = {
OPT_CALLBACK('j', "branch-filter", &opts->branch_stack,
"branch filter mask", "branch stack filter modes",
parse_branch_stack),
+ OPT_BOOLEAN(0, "raw-trace", &symbol_conf.raw_trace,
+ "Show raw trace event output (do not use print fmt or plugins)"),
OPT_END()
};
const char * const top_usage[] = {
evsel = hists_to_evsel(he->hists);
trace_seq_init(&seq);
- pevent_event_info(&seq, evsel->tp_format, &rec);
+ if (symbol_conf.raw_trace) {
+ pevent_print_fields(&seq, he->raw_data, he->raw_size,
+ evsel->tp_format);
+ } else {
+ pevent_event_info(&seq, evsel->tp_format, &rec);
+ }
return seq.buffer;
}
struct perf_evsel *evsel;
struct format_field *field;
unsigned dynamic_len;
+ bool raw_trace;
};
static int hde_width(struct hpp_dynamic_entry *hde)
size_t namelen;
bool last = false;
+ if (hde->raw_trace)
+ return;
+
/* parse pretty print result and update max length */
if (!he->trace_output)
he->trace_output = get_trace_output(he);
if (hists_to_evsel(he->hists) != hde->evsel)
return scnprintf(hpp->buf, hpp->size, "%*.*s", len, len, "N/A");
- field = hde->field;
+ if (hde->raw_trace)
+ goto raw_field;
+ field = hde->field;
namelen = strlen(field->name);
str = he->trace_output;
if (str == NULL) {
struct trace_seq seq;
+raw_field:
trace_seq_init(&seq);
pevent_print_field(&seq, he->raw_data, hde->field);
str = seq.buffer;
static int add_dynamic_entry(struct perf_evlist *evlist, const char *tok)
{
- char *str, *event_name, *field_name;
+ char *str, *event_name, *field_name, *raw_opt;
struct perf_evsel *evsel, *pos;
struct format_field *field;
struct hpp_dynamic_entry *hde;
+ bool raw_trace = symbol_conf.raw_trace;
int ret = 0;
if (evlist == NULL)
}
*field_name++ = '\0';
+ raw_opt = strchr(field_name, '/');
+ if (raw_opt) {
+ *raw_opt++ = '\0';
+
+ if (strcmp(raw_opt, "raw")) {
+ pr_err("Unsupported field option %s\n", raw_opt);
+ ret = -EINVAL;
+ goto out;
+ }
+ raw_trace = true;
+ }
+
evsel = NULL;
evlist__for_each(evlist, pos) {
if (!strcmp(pos->name, event_name)) {
ret = -ENOMEM;
goto out;
}
+ hde->raw_trace = raw_trace;
perf_hpp__register_sort_field(&hde->hpp);