Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tests: Use thread->mg->machine

Instead of passing both thread and machine.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-y2nl2v7p7of0dzuyc3tppxoo@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+4 -6
+4 -6
tools/perf/tests/code-reading.c
··· 133 133 } 134 134 135 135 static int read_object_code(u64 addr, size_t len, u8 cpumode, 136 - struct thread *thread, struct machine *machine, 137 - struct state *state) 136 + struct thread *thread, struct state *state) 138 137 { 139 138 struct addr_location al; 140 139 unsigned char buf1[BUFSZ]; ··· 168 169 len = al.map->end - addr; 169 170 170 171 /* Read the object code using perf */ 171 - ret_len = dso__data_read_offset(al.map->dso, machine, al.addr, buf1, 172 - len); 172 + ret_len = dso__data_read_offset(al.map->dso, thread->mg->machine, 173 + al.addr, buf1, len); 173 174 if (ret_len != len) { 174 175 pr_debug("dso__data_read_offset failed\n"); 175 176 return -1; ··· 262 263 263 264 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; 264 265 265 - return read_object_code(sample.ip, READLEN, cpumode, thread, machine, 266 - state); 266 + return read_object_code(sample.ip, READLEN, cpumode, thread, state); 267 267 } 268 268 269 269 static int process_event(struct machine *machine, struct perf_evlist *evlist,