aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/header.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-12-18 17:15:48 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-01-24 14:40:12 -0500
commit876650e6c3209861a8949111140d805b3440951f (patch)
tree92923adf71a21512f20889c49ace7ed42b139f29 /tools/perf/util/header.c
parent28a6b6aa54878a6a239e901698b3fc111bbcc54f (diff)
perf machine: Introduce struct machines
That consolidates the grouping of host + guests, isolating a bit more of functionality now centered on 'perf_session' that can be used independently in tools that don't need a 'perf_session' instance, but needs to have all the thread/map/symbol machinery. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> 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-c700rsiphpmzv8klogojpfut@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r--tools/perf/util/header.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index bb578d2d10f9..fccd69dbbbb9 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -287,12 +287,12 @@ static int dsos__write_buildid_table(struct perf_header *header, int fd)
287 struct perf_session *session = container_of(header, 287 struct perf_session *session = container_of(header,
288 struct perf_session, header); 288 struct perf_session, header);
289 struct rb_node *nd; 289 struct rb_node *nd;
290 int err = machine__write_buildid_table(&session->host_machine, fd); 290 int err = machine__write_buildid_table(&session->machines.host, fd);
291 291
292 if (err) 292 if (err)
293 return err; 293 return err;
294 294
295 for (nd = rb_first(&session->machines); nd; nd = rb_next(nd)) { 295 for (nd = rb_first(&session->machines.guests); nd; nd = rb_next(nd)) {
296 struct machine *pos = rb_entry(nd, struct machine, rb_node); 296 struct machine *pos = rb_entry(nd, struct machine, rb_node);
297 err = machine__write_buildid_table(pos, fd); 297 err = machine__write_buildid_table(pos, fd);
298 if (err) 298 if (err)
@@ -448,9 +448,9 @@ static int perf_session__cache_build_ids(struct perf_session *session)
448 if (mkdir(debugdir, 0755) != 0 && errno != EEXIST) 448 if (mkdir(debugdir, 0755) != 0 && errno != EEXIST)
449 return -1; 449 return -1;
450 450
451 ret = machine__cache_build_ids(&session->host_machine, debugdir); 451 ret = machine__cache_build_ids(&session->machines.host, debugdir);
452 452
453 for (nd = rb_first(&session->machines); nd; nd = rb_next(nd)) { 453 for (nd = rb_first(&session->machines.guests); nd; nd = rb_next(nd)) {
454 struct machine *pos = rb_entry(nd, struct machine, rb_node); 454 struct machine *pos = rb_entry(nd, struct machine, rb_node);
455 ret |= machine__cache_build_ids(pos, debugdir); 455 ret |= machine__cache_build_ids(pos, debugdir);
456 } 456 }
@@ -467,9 +467,9 @@ static bool machine__read_build_ids(struct machine *machine, bool with_hits)
467static bool perf_session__read_build_ids(struct perf_session *session, bool with_hits) 467static bool perf_session__read_build_ids(struct perf_session *session, bool with_hits)
468{ 468{
469 struct rb_node *nd; 469 struct rb_node *nd;
470 bool ret = machine__read_build_ids(&session->host_machine, with_hits); 470 bool ret = machine__read_build_ids(&session->machines.host, with_hits);
471 471
472 for (nd = rb_first(&session->machines); nd; nd = rb_next(nd)) { 472 for (nd = rb_first(&session->machines.guests); nd; nd = rb_next(nd)) {
473 struct machine *pos = rb_entry(nd, struct machine, rb_node); 473 struct machine *pos = rb_entry(nd, struct machine, rb_node);
474 ret |= machine__read_build_ids(pos, with_hits); 474 ret |= machine__read_build_ids(pos, with_hits);
475 } 475 }