* [PATCH] perf: symbol - mark vmlinux filename as allocated
@ 2013-01-14 17:47 David Ahern
2013-01-25 11:48 ` [tip:perf/core] perf symbols: Mark " tip-bot for David Ahern
0 siblings, 1 reply; 3+ messages in thread
From: David Ahern @ 2013-01-14 17:47 UTC (permalink / raw)
To: acme, linux-kernel; +Cc: David Ahern
Needs to be marked allocated so memory can be freed when
dso is deleted.
Signed-off-by: David Ahern <dsahern@gmail.com>
---
tools/perf/util/symbol.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 295f8d4..61edfd0 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1124,8 +1124,10 @@ int dso__load_vmlinux_path(struct dso *dso, struct map *map,
filename = dso__build_id_filename(dso, NULL, 0);
if (filename != NULL) {
err = dso__load_vmlinux(dso, map, filename, filter);
- if (err > 0)
+ if (err > 0) {
+ dso->lname_alloc = 1;
goto out;
+ }
free(filename);
}
@@ -1133,6 +1135,7 @@ int dso__load_vmlinux_path(struct dso *dso, struct map *map,
err = dso__load_vmlinux(dso, map, vmlinux_path[i], filter);
if (err > 0) {
dso__set_long_name(dso, strdup(vmlinux_path[i]));
+ dso->lname_alloc = 1;
break;
}
}
@@ -1172,6 +1175,7 @@ static int dso__load_kernel_sym(struct dso *dso, struct map *map,
if (err > 0) {
dso__set_long_name(dso,
strdup(symbol_conf.vmlinux_name));
+ dso->lname_alloc = 1;
goto out_fixup;
}
return err;
--
1.7.10.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [tip:perf/core] perf symbols: Mark vmlinux filename as allocated
2013-01-14 17:47 [PATCH] perf: symbol - mark vmlinux filename as allocated David Ahern
@ 2013-01-25 11:48 ` tip-bot for David Ahern
0 siblings, 0 replies; 3+ messages in thread
From: tip-bot for David Ahern @ 2013-01-25 11:48 UTC (permalink / raw)
To: linux-tip-commits; +Cc: acme, linux-kernel, hpa, mingo, dsahern, tglx
Commit-ID: b7c14a0b6a4e3add92e1527a31cb1826f4799248
Gitweb: http://git.kernel.org/tip/b7c14a0b6a4e3add92e1527a31cb1826f4799248
Author: David Ahern <dsahern@gmail.com>
AuthorDate: Mon, 14 Jan 2013 10:47:30 -0700
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 24 Jan 2013 16:40:32 -0300
perf symbols: Mark vmlinux filename as allocated
Needs to be marked allocated so memory can be freed when dso is deleted.
Signed-off-by: David Ahern <dsahern@gmail.com>
Link: http://lkml.kernel.org/r/1358185650-90848-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/symbol.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index daf9554..e6432d8 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -923,8 +923,10 @@ int dso__load_vmlinux_path(struct dso *dso, struct map *map,
filename = dso__build_id_filename(dso, NULL, 0);
if (filename != NULL) {
err = dso__load_vmlinux(dso, map, filename, filter);
- if (err > 0)
+ if (err > 0) {
+ dso->lname_alloc = 1;
goto out;
+ }
free(filename);
}
@@ -932,6 +934,7 @@ int dso__load_vmlinux_path(struct dso *dso, struct map *map,
err = dso__load_vmlinux(dso, map, vmlinux_path[i], filter);
if (err > 0) {
dso__set_long_name(dso, strdup(vmlinux_path[i]));
+ dso->lname_alloc = 1;
break;
}
}
@@ -971,6 +974,7 @@ static int dso__load_kernel_sym(struct dso *dso, struct map *map,
if (err > 0) {
dso__set_long_name(dso,
strdup(symbol_conf.vmlinux_name));
+ dso->lname_alloc = 1;
goto out_fixup;
}
return err;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] perf: symbol - mark vmlinux filename as allocated
@ 2013-01-14 16:51 David Ahern
0 siblings, 0 replies; 3+ messages in thread
From: David Ahern @ 2013-01-14 16:51 UTC (permalink / raw)
To: acme, linux-kernel; +Cc: David Ahern
Needs to be marked allocated so memory can be freed when
dso is deleted.
---
tools/perf/util/symbol.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 295f8d4..61edfd0 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1124,8 +1124,10 @@ int dso__load_vmlinux_path(struct dso *dso, struct map *map,
filename = dso__build_id_filename(dso, NULL, 0);
if (filename != NULL) {
err = dso__load_vmlinux(dso, map, filename, filter);
- if (err > 0)
+ if (err > 0) {
+ dso->lname_alloc = 1;
goto out;
+ }
free(filename);
}
@@ -1133,6 +1135,7 @@ int dso__load_vmlinux_path(struct dso *dso, struct map *map,
err = dso__load_vmlinux(dso, map, vmlinux_path[i], filter);
if (err > 0) {
dso__set_long_name(dso, strdup(vmlinux_path[i]));
+ dso->lname_alloc = 1;
break;
}
}
@@ -1172,6 +1175,7 @@ static int dso__load_kernel_sym(struct dso *dso, struct map *map,
if (err > 0) {
dso__set_long_name(dso,
strdup(symbol_conf.vmlinux_name));
+ dso->lname_alloc = 1;
goto out_fixup;
}
return err;
--
1.7.10.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-25 11:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-14 17:47 [PATCH] perf: symbol - mark vmlinux filename as allocated David Ahern
2013-01-25 11:48 ` [tip:perf/core] perf symbols: Mark " tip-bot for David Ahern
-- strict thread matches above, loose matches on Subject: below --
2013-01-14 16:51 [PATCH] perf: symbol - mark " David Ahern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox