Add native_arch as a parameter to script_fetch_insn rather than relying on the builtin-script value that won't be initialized for the dlfilter and python Context use cases. Assume both of those cases are running natively.
Showing the changes to tools/perf/scripts/python (1 of 6 files). Show all
Unified · Split
| @@ -93,7 +93,7 @@ static PyObject *perf_sample_insn(PyObject *obj, PyObject *args) · 92 unmodified lines | |||
| 93 | if (c->sample->ip && !c->sample->insn_len && thread__maps(c->al->thread)) { | 93 | if (c->sample->ip && !c->sample->insn_len && thread__maps(c->al->thread)) { |
| 94 | struct machine *machine = maps__machine(thread__maps(c->al->thread)); | 94 | struct machine *machine = maps__machine(thread__maps(c->al->thread)); |
| 95 | 95 | ||
| 96 | script_fetch_insn(c->sample, c->al->thread, machine); | 96 | script_fetch_insn(c->sample, c->al->thread, machine, /*native_arch=*/true); |
| 97 | } | 97 | } |
| 98 | if (!c->sample->insn_len) | 98 | if (!c->sample->insn_len) |
| 99 | Py_RETURN_NONE; /* N.B. This is a return statement */ | 99 | Py_RETURN_NONE; /* N.B. This is a return statement */ |