KVM: selftests: Move raw KVM_SET_USER_MEMORY_REGION helper to utils
[linux-2.6-microblaze.git] / tools / perf / builtin-trace.c
index df9fc00..32844d8 100644 (file)
@@ -2726,6 +2726,8 @@ static size_t trace__fprintf_tp_fields(struct trace *trace, struct evsel *evsel,
                                offset = format_field__intval(field, sample, evsel->needs_swap);
                                syscall_arg.len = offset >> 16;
                                offset &= 0xffff;
+                               if (field->flags & TEP_FIELD_IS_RELATIVE)
+                                       offset += field->offset + field->size;
                        }
 
                        val = (uintptr_t)(sample->raw_data + offset);
@@ -3962,6 +3964,9 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
                evlist__add(evlist, pgfault_min);
        }
 
+       /* Enable ignoring missing threads when -u/-p option is defined. */
+       trace->opts.ignore_missing_thread = trace->opts.target.uid != UINT_MAX || trace->opts.target.pid;
+
        if (trace->sched &&
            evlist__add_newtp(evlist, "sched", "sched_stat_runtime", trace__sched_stat_runtime))
                goto out_error_sched_stat_runtime;