Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1399759 > unrolled thread
| Started by | He Kuang <hekuang@huawei.com> |
|---|---|
| First post | 2016-05-12 10:50 +0200 |
| Last post | 2016-05-18 05:10 +0200 |
| Articles | 16 — 4 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given He Kuang <hekuang@huawei.com> - 2016-05-12 10:50 +0200
Re: [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-12 15:10 +0200
Re: [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given David Ahern <dsahern@gmail.com> - 2016-05-12 22:30 +0200
Re: [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-12 22:40 +0200
Re: [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given Hekuang <hekuang@huawei.com> - 2016-05-13 09:30 +0200
Re: [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given David Ahern <dsahern@gmail.com> - 2016-05-13 16:30 +0200
Re: [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-13 20:10 +0200
[PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs He Kuang <hekuang@huawei.com> - 2016-05-14 10:30 +0200
Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs David Ahern <dsahern@gmail.com> - 2016-05-14 16:50 +0200
Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs Hekuang <hekuang@huawei.com> - 2016-05-16 04:10 +0200
Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs David Ahern <dsahern@gmail.com> - 2016-05-16 05:00 +0200
Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs Hekuang <hekuang@huawei.com> - 2016-05-16 08:50 +0200
Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs Hekuang <hekuang@huawei.com> - 2016-05-18 04:00 +0200
Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs David Ahern <dsahern@gmail.com> - 2016-05-18 04:00 +0200
Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs Hekuang <hekuang@huawei.com> - 2016-05-18 05:00 +0200
Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs David Ahern <dsahern@gmail.com> - 2016-05-18 05:10 +0200
| From | He Kuang <hekuang@huawei.com> |
|---|---|
| Date | 2016-05-12 10:50 +0200 |
| Subject | [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given |
| Message-ID | <rxUtI-1Wg-9@gated-at.bofh.it> |
Symfs dir and buildid dir are two places that perf looks into for symbols, currently, if symfs dir is given, buildid-cache is skipped. In the cross-platform perf record/script scenario, we need vdsos in buildid-cache dir and other libs in symfs dir at the same time. And consider that the binaries indexed by buildid do not cause ambiguity, this patch simply removes that logical. Signed-off-by: He Kuang <hekuang@huawei.com> --- tools/perf/util/dso.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index b39b80c..a07166c5 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -64,8 +64,7 @@ int dso__read_binary_type_filename(const struct dso *dso, break; case DSO_BINARY_TYPE__BUILD_ID_CACHE: /* skip the locally configured cache if a symfs is given */ - if (symbol_conf.symfs[0] || - (dso__build_id_filename(dso, filename, size) == NULL)) + if (dso__build_id_filename(dso, filename, size) == NULL) ret = -1; break; -- 1.8.5.2
[toc] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-05-12 15:10 +0200 |
| Subject | Re: [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given |
| Message-ID | <rxYxk-6rM-21@gated-at.bofh.it> |
| In reply to | #1399759 |
Em Thu, May 12, 2016 at 08:43:12AM +0000, He Kuang escreveu: > Symfs dir and buildid dir are two places that perf looks into for > symbols, currently, if symfs dir is given, buildid-cache is skipped. > > In the cross-platform perf record/script scenario, we need vdsos in > buildid-cache dir and other libs in symfs dir at the same time. And > consider that the binaries indexed by buildid do not cause ambiguity, > this patch simply removes that logical. Makes perfect sense, David, do you have any concern? Can I have your Acked-by? - Arnaldo > Signed-off-by: He Kuang <hekuang@huawei.com> > --- > tools/perf/util/dso.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c > index b39b80c..a07166c5 100644 > --- a/tools/perf/util/dso.c > +++ b/tools/perf/util/dso.c > @@ -64,8 +64,7 @@ int dso__read_binary_type_filename(const struct dso *dso, > break; > case DSO_BINARY_TYPE__BUILD_ID_CACHE: > /* skip the locally configured cache if a symfs is given */ > - if (symbol_conf.symfs[0] || > - (dso__build_id_filename(dso, filename, size) == NULL)) > + if (dso__build_id_filename(dso, filename, size) == NULL) > ret = -1; > break; > > -- > 1.8.5.2
[toc] | [prev] | [next] | [standalone]
| From | David Ahern <dsahern@gmail.com> |
|---|---|
| Date | 2016-05-12 22:30 +0200 |
| Subject | Re: [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given |
| Message-ID | <ry5p8-4Cj-17@gated-at.bofh.it> |
| In reply to | #1400058 |
On 5/12/16 7:09 AM, Arnaldo Carvalho de Melo wrote: > Em Thu, May 12, 2016 at 08:43:12AM +0000, He Kuang escreveu: >> Symfs dir and buildid dir are two places that perf looks into for >> symbols, currently, if symfs dir is given, buildid-cache is skipped. >> >> In the cross-platform perf record/script scenario, we need vdsos in >> buildid-cache dir and other libs in symfs dir at the same time. And >> consider that the binaries indexed by buildid do not cause ambiguity, >> this patch simply removes that logical. > > Makes perfect sense, David, do you have any concern? Can I have your > Acked-by? seems odd to me you want to look in the buildid-cache when a symfs is given. The point of symfs was "go look for everything under here." I believe dso__load is going to hit DSO_BINARY_TYPE__BUILD_ID_CACHE before any of the others and there are probably cases where a stale cache entry would be hit before a build tree entry (e.g., symfs). What about putting the build id cache under the symfs? so instead of dropping the symfs check and it to the path for the build id cache.
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-05-12 22:40 +0200 |
| Subject | Re: [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given |
| Message-ID | <ry5yO-4H0-17@gated-at.bofh.it> |
| In reply to | #1400354 |
Em Thu, May 12, 2016 at 02:23:37PM -0600, David Ahern escreveu: > On 5/12/16 7:09 AM, Arnaldo Carvalho de Melo wrote: > > Em Thu, May 12, 2016 at 08:43:12AM +0000, He Kuang escreveu: > > > Symfs dir and buildid dir are two places that perf looks into for > > > symbols, currently, if symfs dir is given, buildid-cache is skipped. > > > In the cross-platform perf record/script scenario, we need vdsos in > > > buildid-cache dir and other libs in symfs dir at the same time. And > > > consider that the binaries indexed by buildid do not cause ambiguity, > > > this patch simply removes that logical. > > Makes perfect sense, David, do you have any concern? Can I have your > > Acked-by? > seems odd to me you want to look in the buildid-cache when a symfs is given. > The point of symfs was "go look for everything under here." > I believe dso__load is going to hit DSO_BINARY_TYPE__BUILD_ID_CACHE before > any of the others and there are probably cases where a stale cache entry > would be hit before a build tree entry (e.g., symfs). Stale cache entry? How'd that be? Its content based, i.e. if there is an entry for a given build id _anywhere_ why wouldn't we want to use it? > What about putting the build id cache under the symfs? so instead of > dropping the symfs check and it to the path for the build id cache. Well, the use case of look at both still looks sane to me, but maybe the way you suggest works for He, He? - Arnaldo
[toc] | [prev] | [next] | [standalone]
| From | Hekuang <hekuang@huawei.com> |
|---|---|
| Date | 2016-05-13 09:30 +0200 |
| Subject | Re: [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given |
| Message-ID | <ryfHP-72l-3@gated-at.bofh.it> |
| In reply to | #1400354 |
hi 在 2016/5/13 4:23, David Ahern 写道: > On 5/12/16 7:09 AM, Arnaldo Carvalho de Melo wrote: >> Em Thu, May 12, 2016 at 08:43:12AM +0000, He Kuang escreveu: >>> Symfs dir and buildid dir are two places that perf looks into for >>> symbols, currently, if symfs dir is given, buildid-cache is skipped. >>> >>> In the cross-platform perf record/script scenario, we need vdsos in >>> buildid-cache dir and other libs in symfs dir at the same time. And >>> consider that the binaries indexed by buildid do not cause ambiguity, >>> this patch simply removes that logical. >> >> Makes perfect sense, David, do you have any concern? Can I have your >> Acked-by? > > seems odd to me you want to look in the buildid-cache when a symfs is > given. The point of symfs was "go look for everything under here." > > I believe dso__load is going to hit DSO_BINARY_TYPE__BUILD_ID_CACHE > before any of the others and there are probably cases where a stale > cache entry would be hit before a build tree entry (e.g., symfs). Build id entries recorded in perf.data reflect the current dso, so if buildid is matched , how can it be a stale one? > > What about putting the build id cache under the symfs? so instead of > dropping the symfs check and it to the path for the build id cache. > > I think your intention is to reference symbol files in one place instead of two. So there're two possible approaches, one is all in buildid-cache, but in practice, I found lots of binaries in symfs even not contains valid buildid, so this way is not work. The other one is all in symfs. It seems ok, but one problem I should point out, with my test environment as an example, the symfsdir is $(TARGET_ROOTFS),and by default buildid_dir is $(TARGET_ROOTFS)/$(HOME)/.debug/, host perf does not know $(HOME) folder in target and we should copy the debug folder to $(TARGET_ROOTFS), which is readonly in the target. For me, it's easier to use 'buildid-cache -a vdso-xxxx' to add that into host buildid-cache than copy debug folder from $(HOME) to readonly $(TARGET_ROOTFS). Without the stale concern, I prefer the two places(buildid-dir in host and target symfs) way. Thanks.
[toc] | [prev] | [next] | [standalone]
| From | David Ahern <dsahern@gmail.com> |
|---|---|
| Date | 2016-05-13 16:30 +0200 |
| Subject | Re: [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given |
| Message-ID | <rymgi-55V-5@gated-at.bofh.it> |
| In reply to | #1400553 |
On 5/13/16 1:19 AM, Hekuang wrote: >> What about putting the build id cache under the symfs? so instead of >> dropping the symfs check and it to the path for the build id cache. >> >> > I think your intention is to reference symbol files in one place > instead of two. So there're two possible approaches, one is all > in buildid-cache, but in practice, I found lots of binaries in > symfs even not contains valid buildid, so this way is not work. > > The other one is all in symfs. It seems ok, but one problem I > should point out, with my test environment as an example, the > symfsdir is $(TARGET_ROOTFS),and by default buildid_dir is > $(TARGET_ROOTFS)/$(HOME)/.debug/, host perf does not know > $(HOME) folder in target and we should copy the debug folder > to $(TARGET_ROOTFS), which is readonly in the target. For me, it's > easier to use 'buildid-cache -a vdso-xxxx' to add that into host > buildid-cache than copy debug folder from $(HOME) to readonly > $(TARGET_ROOTFS). > > Without the stale concern, I prefer the two places(buildid-dir in > host and target symfs) way. The intention of symfs is every single file opened by perf is relative to that directory. As I recall when I added that option in early 2011 I made sure that statement is true. I think it is best to maintain that design.
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-05-13 20:10 +0200 |
| Subject | Re: [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given |
| Message-ID | <rypHc-py-17@gated-at.bofh.it> |
| In reply to | #1400826 |
Em Fri, May 13, 2016 at 08:27:29AM -0600, David Ahern escreveu: > On 5/13/16 1:19 AM, Hekuang wrote: > > > What about putting the build id cache under the symfs? so instead of > > > dropping the symfs check and it to the path for the build id cache. > > I think your intention is to reference symbol files in one place > > instead of two. So there're two possible approaches, one is all > > in buildid-cache, but in practice, I found lots of binaries in > > symfs even not contains valid buildid, so this way is not work. > > The other one is all in symfs. It seems ok, but one problem I > > should point out, with my test environment as an example, the > > symfsdir is $(TARGET_ROOTFS),and by default buildid_dir is > > $(TARGET_ROOTFS)/$(HOME)/.debug/, host perf does not know > > $(HOME) folder in target and we should copy the debug folder > > to $(TARGET_ROOTFS), which is readonly in the target. For me, it's > > easier to use 'buildid-cache -a vdso-xxxx' to add that into host > > buildid-cache than copy debug folder from $(HOME) to readonly > > $(TARGET_ROOTFS). > > Without the stale concern, I prefer the two places(buildid-dir in > > host and target symfs) way. > > The intention of symfs is every single file opened by perf is relative to > that directory. As I recall when I added that option in early 2011 I made > sure that statement is true. I think it is best to maintain that design. Ok, so we can introduce --dso-prefix for Hekuang's use case, i.e. be able to lookup by build-id, fallbacking to a (possibly read-only) directory. This way the existing --symfs semantic remains written in stone. - Arnaldo
[toc] | [prev] | [next] | [standalone]
| From | He Kuang <hekuang@huawei.com> |
|---|---|
| Date | 2016-05-14 10:30 +0200 |
| Subject | [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs |
| Message-ID | <ryD7r-5hB-5@gated-at.bofh.it> |
| In reply to | #1400927 |
In the cross-platform perf record/script scenario, we need vdsos in
buildid-cache dir and other libs in symfs dir at the same time. For
the reason that to have every single file opened by perf is relative
to symfs dirctory, perf skips the buildid dir if symfs is given.
This patch references the buildid dir under symfs if '--symfs' is
used, and adds new option '--dso-prefix' to specify the subdir path in
symfs which contains the buildid dsos.
Signed-off-by: He Kuang <hekuang@huawei.com>
---
tools/perf/builtin-script.c | 2 ++
tools/perf/util/config.c | 10 ++++++++++
tools/perf/util/dso.c | 6 ++++--
tools/perf/util/symbol.c | 1 +
tools/perf/util/symbol.h | 1 +
tools/perf/util/util.h | 1 +
6 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 8f6ab2a..52526e8 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -2043,6 +2043,8 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
"Enable symbol demangling"),
OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel,
"Enable kernel symbol demangling"),
+ OPT_STRING(0, "dso-prefix", &symbol_conf.dso_prefix, "direcotry",
+ "Look for dsos relative to this directory under symfs"),
OPT_END()
};
diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index 664490b..17bee62 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -553,3 +553,13 @@ void set_buildid_dir(const char *dir)
/* for communicating with external commands */
setenv("PERF_BUILDID_DIR", buildid_dir, 1);
}
+
+static bool buildid_dir_under_symfs_flag;
+void set_buildid_dir_under_symfs(void)
+{
+ if (!buildid_dir_under_symfs_flag && symbol_conf.symfs[0]) {
+ __symbol__join_symfs(buildid_dir, MAXPATHLEN-1,
+ symbol_conf.dso_prefix);
+ buildid_dir_under_symfs_flag = true;
+ }
+}
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index b39b80c..fb34274 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -64,8 +64,10 @@ int dso__read_binary_type_filename(const struct dso *dso,
break;
case DSO_BINARY_TYPE__BUILD_ID_CACHE:
/* skip the locally configured cache if a symfs is given */
- if (symbol_conf.symfs[0] ||
- (dso__build_id_filename(dso, filename, size) == NULL))
+ if (symbol_conf.symfs[0])
+ set_buildid_dir_under_symfs();
+
+ if (dso__build_id_filename(dso, filename, size) == NULL)
ret = -1;
break;
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index e7588dc..7aa34ca 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -40,6 +40,7 @@ struct symbol_conf symbol_conf = {
.show_hist_headers = true,
.symfs = "",
.event_group = true,
+ .dso_prefix = "",
};
static enum dso_binary_type binary_type_symtab[] = {
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index c8b7544..c0fefdb 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -136,6 +136,7 @@ struct symbol_conf {
struct intlist *pid_list,
*tid_list;
const char *symfs;
+ const char *dso_prefix;
};
extern struct symbol_conf symbol_conf;
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 3bf3de8..f8e5582 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -142,6 +142,7 @@ void set_warning_routine(void (*routine)(const char *err, va_list params));
int prefixcmp(const char *str, const char *prefix);
void set_buildid_dir(const char *dir);
+void set_buildid_dir_under_symfs(void);
#ifdef __GLIBC_PREREQ
#if __GLIBC_PREREQ(2, 1)
--
1.8.5.2
[toc] | [prev] | [next] | [standalone]
| From | David Ahern <dsahern@gmail.com> |
|---|---|
| Date | 2016-05-14 16:50 +0200 |
| Subject | Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs |
| Message-ID | <ryJ3c-2kb-3@gated-at.bofh.it> |
| In reply to | #1401073 |
On 5/14/16 2:19 AM, He Kuang wrote: > In the cross-platform perf record/script scenario, we need vdsos in > buildid-cache dir and other libs in symfs dir at the same time. For > the reason that to have every single file opened by perf is relative > to symfs dirctory, perf skips the buildid dir if symfs is given. > > This patch references the buildid dir under symfs if '--symfs' is > used, and adds new option '--dso-prefix' to specify the subdir path in > symfs which contains the buildid dsos. In the previous version of this patch you just wanted to drop the symfs check. That means there is a path that perf searches for buildid files and reading it worked for you. Why is adding symsfs to that path not enough? ie., Why do you need to specify a different location under the symfs?
[toc] | [prev] | [next] | [standalone]
| From | Hekuang <hekuang@huawei.com> |
|---|---|
| Date | 2016-05-16 04:10 +0200 |
| Subject | Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs |
| Message-ID | <rzg8Z-u7-305@gated-at.bofh.it> |
| In reply to | #1401091 |
在 2016/5/14 22:43, David Ahern 写道:
> On 5/14/16 2:19 AM, He Kuang wrote:
>> In the cross-platform perf record/script scenario, we need vdsos in
>> buildid-cache dir and other libs in symfs dir at the same time. For
>> the reason that to have every single file opened by perf is relative
>> to symfs dirctory, perf skips the buildid dir if symfs is given.
>>
>> This patch references the buildid dir under symfs if '--symfs' is
>> used, and adds new option '--dso-prefix' to specify the subdir path in
>> symfs which contains the buildid dsos.
>
> In the previous version of this patch you just wanted to drop the
> symfs check. That means there is a path that perf searches for buildid
> files and reading it worked for you. Why is adding symsfs to that path
> not enough? ie., Why do you need to specify a different location under
> the symfs?
>
In previous patch, I use 'perf buildid-cache -a' to add vdso
binary into the HOST buildid dir.
Currently, $(BUILDID_ROOT)/.debug/.buildid has a directory
structure organized by the buildid value, like this:
.build-id
- 3a
| e5ba6d4e532ad529e43ccf1ce1ddf8a64a4fdd
- 84
dbd75729adba57cc42f5544b25de571c0c8731
perf searchs for buildid binaries by the buildid value.
And symfs is a normal file tree and perf searchs for binaryies
by the file name.
lib
- libc.so
- ld.so
Tt's inappropriate to add symfs to .build-id dir becuase they
have different dirctory structure and perf searchs for them by
differnt ways.
So in this patch I add .buildid to symfs and got dirctory tree
like this:
symfs
- $(DSO_PREFIX)
- .build-id
- 3a
- 84
- libc.so
- ld.so
Thanks
[toc] | [prev] | [next] | [standalone]
| From | David Ahern <dsahern@gmail.com> |
|---|---|
| Date | 2016-05-16 05:00 +0200 |
| Subject | Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs |
| Message-ID | <rzgVg-15U-121@gated-at.bofh.it> |
| In reply to | #1401259 |
On 5/15/16 7:30 PM, Hekuang wrote: > In previous patch, I use 'perf buildid-cache -a' to add vdso > binary into the HOST buildid dir. So 'perf buildid-cache' needs the symfs option?
[toc] | [prev] | [next] | [standalone]
| From | Hekuang <hekuang@huawei.com> |
|---|---|
| Date | 2016-05-16 08:50 +0200 |
| Subject | Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs |
| Message-ID | <rzkvM-3ws-7@gated-at.bofh.it> |
| In reply to | #1401295 |
在 2016/5/16 10:50, David Ahern 写道: > On 5/15/16 7:30 PM, Hekuang wrote: >> In previous patch, I use 'perf buildid-cache -a' to add vdso >> binary into the HOST buildid dir. > > So 'perf buildid-cache' needs the symfs option? > > No, for the host, we don't reference any files in buildid-cache if symfs is givin.
[toc] | [prev] | [next] | [standalone]
| From | Hekuang <hekuang@huawei.com> |
|---|---|
| Date | 2016-05-18 04:00 +0200 |
| Subject | Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs |
| Message-ID | <rzYWd-3Tq-1@gated-at.bofh.it> |
| In reply to | #1401295 |
在 2016/5/16 10:50, David Ahern 写道: > On 5/15/16 7:30 PM, Hekuang wrote: >> In previous patch, I use 'perf buildid-cache -a' to add vdso >> binary into the HOST buildid dir. > > So 'perf buildid-cache' needs the symfs option? > > With this patch 'PATCH v3 3/7 UPDATE', the tree of symfs dir is like this: ├── debug($(dso-prefix)) │ ├── .build-id │ │ ├── 3a │ │ │ └── e5ba6d4e532ad529e43ccf1ce1ddf8a64a4fdd -> ../../[kernel.kallsyms]/3ae5ba6d4e532ad529e43ccf1ce1ddf8a64a4fdd │ │ └── 84 │ │ └── dbd75729adba57cc42f5544b25de571c0c8731 -> ../../[vdso32]/84dbd75729adba57cc42f5544b25de571c0c8731 │ ├── [kernel.kallsyms] │ │ └── 3ae5ba6d4e532ad529e43ccf1ce1ddf8a64a4fdd │ ├── [vdso] │ │ └── 84dbd75729adba57cc42f5544b25de571c0c8731 │ └── [vdso32] │ └── 84dbd75729adba57cc42f5544b25de571c0c8731 ├── lib │ ├── ld-2.22.so │ └── libc-2.22.so ├── tmp │ └── hello └── xxx So all binaries we need are included in the symfs dir. I think this is consistent with your idea explained in previous mails. With this symfs, we do not need buildid dir anymore and what's your idea on 'perf buildid-cache' needs symfs option? after all, that only effects on buildid dir. Thanks.
[toc] | [prev] | [next] | [standalone]
| From | David Ahern <dsahern@gmail.com> |
|---|---|
| Date | 2016-05-18 04:00 +0200 |
| Subject | Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs |
| Message-ID | <rzYWd-3Tq-3@gated-at.bofh.it> |
| In reply to | #1402694 |
On 5/17/16 7:47 PM, Hekuang wrote: > > > 在 2016/5/16 10:50, David Ahern 写道: >> On 5/15/16 7:30 PM, Hekuang wrote: >>> In previous patch, I use 'perf buildid-cache -a' to add vdso >>> binary into the HOST buildid dir. >> >> So 'perf buildid-cache' needs the symfs option? >> >> > With this patch 'PATCH v3 3/7 UPDATE', the tree of symfs dir is > like this: > > ├── debug($(dso-prefix)) > │ ├── .build-id > │ │ ├── 3a > │ │ │ └── e5ba6d4e532ad529e43ccf1ce1ddf8a64a4fdd -> > ../../[kernel.kallsyms]/3ae5ba6d4e532ad529e43ccf1ce1ddf8a64a4fdd > │ │ └── 84 > │ │ └── dbd75729adba57cc42f5544b25de571c0c8731 -> > ../../[vdso32]/84dbd75729adba57cc42f5544b25de571c0c8731 > │ ├── [kernel.kallsyms] > │ │ └── 3ae5ba6d4e532ad529e43ccf1ce1ddf8a64a4fdd > │ ├── [vdso] > │ │ └── 84dbd75729adba57cc42f5544b25de571c0c8731 > │ └── [vdso32] > │ └── 84dbd75729adba57cc42f5544b25de571c0c8731 > ├── lib > │ ├── ld-2.22.so > │ └── libc-2.22.so > ├── tmp > │ └── hello > └── xxx > > So all binaries we need are included in the symfs dir. I think > this is consistent with your idea explained in previous mails. > > With this symfs, we do not need buildid dir anymore and what's > your idea on 'perf buildid-cache' needs symfs option? after all, > that only effects on buildid dir. I don't understand why dso-prefix option is needed? Why make me type yet more options to the analysis command? Why can't the directory be located under the symfs tree in a known location and populated the same way it is without symfs?
[toc] | [prev] | [next] | [standalone]
| From | Hekuang <hekuang@huawei.com> |
|---|---|
| Date | 2016-05-18 05:00 +0200 |
| Subject | Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs |
| Message-ID | <rzZSh-4yX-1@gated-at.bofh.it> |
| In reply to | #1402695 |
在 2016/5/18 9:51, David Ahern 写道: > On 5/17/16 7:47 PM, Hekuang wrote: >> >> >> 在 2016/5/16 10:50, David Ahern 写道: >>> On 5/15/16 7:30 PM, Hekuang wrote: >>>> In previous patch, I use 'perf buildid-cache -a' to add vdso >>>> binary into the HOST buildid dir. >>> >>> So 'perf buildid-cache' needs the symfs option? >>> >>> >> With this patch 'PATCH v3 3/7 UPDATE', the tree of symfs dir is >> like this: >> >> ├── debug($(dso-prefix)) >> │ ├── .build-id >> │ │ ├── 3a >> │ │ │ └── e5ba6d4e532ad529e43ccf1ce1ddf8a64a4fdd -> >> ../../[kernel.kallsyms]/3ae5ba6d4e532ad529e43ccf1ce1ddf8a64a4fdd >> │ │ └── 84 >> │ │ └── dbd75729adba57cc42f5544b25de571c0c8731 -> >> ../../[vdso32]/84dbd75729adba57cc42f5544b25de571c0c8731 >> │ ├── [kernel.kallsyms] >> │ │ └── 3ae5ba6d4e532ad529e43ccf1ce1ddf8a64a4fdd >> │ ├── [vdso] >> │ │ └── 84dbd75729adba57cc42f5544b25de571c0c8731 >> │ └── [vdso32] >> │ └── 84dbd75729adba57cc42f5544b25de571c0c8731 >> ├── lib >> │ ├── ld-2.22.so >> │ └── libc-2.22.so >> ├── tmp >> │ └── hello >> └── xxx >> >> So all binaries we need are included in the symfs dir. I think >> this is consistent with your idea explained in previous mails. >> >> With this symfs, we do not need buildid dir anymore and what's >> your idea on 'perf buildid-cache' needs symfs option? after all, >> that only effects on buildid dir. > > I don't understand why dso-prefix option is needed? Why make me type > yet more options to the analysis command? Why can't the directory be > located under the symfs tree in a known location and populated the > same way it is without symfs? > > Because the default buidid folder path is $HOME/.debug/.buildid, and this $HOME is on the target machine, not the same as $HOME on the host. Without that option, we need to copy $HOME/.debug/.buildid to the 'known location in symfs', that's also an extra work.
[toc] | [prev] | [next] | [standalone]
| From | David Ahern <dsahern@gmail.com> |
|---|---|
| Date | 2016-05-18 05:10 +0200 |
| Subject | Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs |
| Message-ID | <rA01X-4S6-5@gated-at.bofh.it> |
| In reply to | #1402702 |
On 5/17/16 8:48 PM, Hekuang wrote: >> I don't understand why dso-prefix option is needed? Why make me type >> yet more options to the analysis command? Why can't the directory be >> located under the symfs tree in a known location and populated the >> same way it is without symfs? >> >> > Because the default buidid folder path is $HOME/.debug/.buildid, > and this $HOME is on the target machine, not the same as $HOME > on the host. Without that option, we need to copy $HOME/.debug/.buildid > to the 'known location in symfs', that's also an extra work. > My argument for symfs is that $HOME is not relevant or if it is the path is symfs/$HOME. The use case is dealing with countless images -- some development, some production. I should be able to nuke the symfs when the analysis is done and everything related to it is gone. With the $HOME/.debug path it just grows on and on with no real means of pruning it. If the vdsos are for a particular symfs then why aren't the vdso's under it in a known location?
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web