PyObject *callchain)
{
PyObject *dict, *dict_sample, *brstack, *brstacksym;
- struct machine *machine;
uint16_t e_machine = EM_HOST;
uint32_t e_flags = EF_HOST;
PyLong_FromUnsignedLongLong(sample->cyc_cnt));
}
- if (al->thread) {
- machine = maps__machine(thread__maps(al->thread));
- e_machine = thread__e_machine(al->thread, machine, &e_flags);
- }
+ if (al->thread)
+ e_machine = thread__e_machine(al->thread, /*machine=*/NULL, &e_flags);
+
if (set_regs_in_dict(dict, sample, evsel, e_machine, e_flags))
Py_FatalError("Failed to setting regs in dict");
static int perf_session__e_machine_cb(struct thread *thread, void *_args)
{
struct perf_session__e_machine_cb_args *args = _args;
- struct machine *machine = maps__machine(thread__maps(thread));
- args->e_machine = thread__e_machine(thread, machine, &args->e_flags);
+ args->e_machine = thread__e_machine(thread, /*machine=*/NULL, &args->e_flags);
return args->e_machine != EM_NONE ? 1 : 0;
}
return e_machine;
}
+ if (machine == NULL) {
+ struct maps *maps = thread__maps(thread);
+
+ machine = maps__machine(maps);
+ }
tid = thread__tid(thread);
pid = thread__pid(thread);
if (pid != tid) {