* perf archive warning @ 2011-03-02 4:23 Han Pingtian [not found] ` <AANLkTim+Ls+_cbHnMzdfWAWUj0Wx2rQtnoTCjZJ8Cnro@mail.gmail.com> 0 siblings, 1 reply; 6+ messages in thread From: Han Pingtian @ 2011-03-02 4:23 UTC (permalink / raw) To: linux-perf-users, linux-kernel; +Cc: Arnaldo Carvalho de Melo, Peter Zijlstra Hi, perf archive has some waring messages, is this a bug? root@intel-s3e36-01 perf]# ./perf-archive tar: .build-id/b2/370e39ea2898c6e11c188e2f3879e4e3d6d1ef: Cannot stat: No such file or directory tar: .build-id/b2/370e39ea2898c6e11c188e2f3879e4e3d6d1ef: Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors Now please run: $ tar xvf perf.data.tar.bz2 -C ~/.debug wherever you need to run 'perf report' on. [root@intel-s3e36-01 perf]# ./perf --version perf version 2.6.38.rc6.166.g493f33 [root@intel-s3e36-01 perf]# ./perf buildid-list b2370e39ea2898c6e11c188e2f3879e4e3d6d1ef [kernel.kallsyms] dd95cb496ebc4ed922eeb5640965f1243fcfcd9a /lib/modules/2.6.32-118.el6.x86_64/kernel/fs/ext4/ext4.ko 9e1aca88b83308cec7574d74975fa6f7d654c96e /lib64/libc-2.12.so d880be15bf992b5fbcc629e6bbf1c747a928ddd5 /lib64/libglib-2.0.so.0.2200.5 d1b2ca4e1ec8f81ba820e5f1375d960107ac7e50 /usr/lib64/libstdc++.so.6.0.13 [root@intel-s3e36-01 perf]# -- Han Pingtian Quality Engineer hpt @ #kernel-qe Red Hat, Inc Freedom ... courage ... Commitment ... ACCOUNTABILITY ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <AANLkTim+Ls+_cbHnMzdfWAWUj0Wx2rQtnoTCjZJ8Cnro@mail.gmail.com>]
* Re: perf archive warning [not found] ` <AANLkTim+Ls+_cbHnMzdfWAWUj0Wx2rQtnoTCjZJ8Cnro@mail.gmail.com> @ 2011-03-02 8:29 ` Lin Ming 2011-03-02 8:53 ` Han Pingtian 0 siblings, 1 reply; 6+ messages in thread From: Lin Ming @ 2011-03-02 8:29 UTC (permalink / raw) To: Han Pingtian Cc: linux-perf-users, linux-kernel, Arnaldo Carvalho de Melo, Peter Zijlstra On Wed, 2011-03-02 at 16:09 +0800, Lin Ming wrote: > ---------- Forwarded message ---------- > From: Han Pingtian <phan@redhat.com> > Date: Wed, Mar 2, 2011 at 12:23 PM > Subject: perf archive warning > To: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org > Cc: Arnaldo Carvalho de Melo <acme@redhat.com>, Peter Zijlstra > <peterz@infradead.org> > > > Hi, > > perf archive has some waring messages, is this a bug? > > root@intel-s3e36-01 perf]# ./perf-archive > tar: .build-id/b2/370e39ea2898c6e11c188e2f3879e4e3d6d1ef: Cannot stat: > No such file or directory > tar: .build-id/b2/370e39ea2898c6e11c188e2f3879e4e3d6d1ef: Cannot stat: > No such file or directory > tar: Exiting with failure status due to previous errors kernel.kallsyms is not created successfully in the buildid-cache. Could you have a try below patch? diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 72c124d..d3b5062 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -271,11 +271,16 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, const char *name, bool is_kallsyms) { const size_t size = PATH_MAX; - char *realname = realpath(name, NULL), + char *realname, *filename = malloc(size), *linkname = malloc(size), *targetname; int len, err = -1; + if (is_kallsyms) + realname = (char *)name; + else + realname = realpath(name, NULL); + if (realname == NULL || filename == NULL || linkname == NULL) goto out_free; @@ -307,7 +312,8 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, if (symlink(targetname, linkname) == 0) err = 0; out_free: - free(realname); + if (!is_kallsyms) + free(realname); free(filename); free(linkname); return err; > Now please run: > > $ tar xvf perf.data.tar.bz2 -C ~/.debug > > wherever you need to run 'perf report' on. > [root@intel-s3e36-01 perf]# ./perf --version > perf version 2.6.38.rc6.166.g493f33 > [root@intel-s3e36-01 perf]# ./perf buildid-list > b2370e39ea2898c6e11c188e2f3879e4e3d6d1ef [kernel.kallsyms] > dd95cb496ebc4ed922eeb5640965f1243fcfcd9a > /lib/modules/2.6.32-118.el6.x86_64/kernel/fs/ext4/ext4.ko > 9e1aca88b83308cec7574d74975fa6f7d654c96e /lib64/libc-2.12.so > d880be15bf992b5fbcc629e6bbf1c747a928ddd5 /lib64/libglib-2.0.so.0.2200.5 > d1b2ca4e1ec8f81ba820e5f1375d960107ac7e50 /usr/lib64/libstdc++.so.6.0.13 > [root@intel-s3e36-01 perf]# > > -- > Han Pingtian > Quality Engineer > hpt @ #kernel-qe > Red Hat, Inc > Freedom ... courage ... Commitment ... ACCOUNTABILITY > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: perf archive warning 2011-03-02 8:29 ` Lin Ming @ 2011-03-02 8:53 ` Han Pingtian 2011-03-03 0:38 ` Lin Ming 0 siblings, 1 reply; 6+ messages in thread From: Han Pingtian @ 2011-03-02 8:53 UTC (permalink / raw) To: Lin Ming Cc: linux-perf-users, linux-kernel, Arnaldo Carvalho de Melo, Peter Zijlstra On Wed, Mar 02, 2011 at 04:29:41PM +0800, Lin Ming wrote: > > > > root@intel-s3e36-01 perf]# ./perf-archive > > tar: .build-id/b2/370e39ea2898c6e11c188e2f3879e4e3d6d1ef: Cannot stat: > > No such file or directory > > tar: .build-id/b2/370e39ea2898c6e11c188e2f3879e4e3d6d1ef: Cannot stat: > > No such file or directory > > tar: Exiting with failure status due to previous errors > > kernel.kallsyms is not created successfully in the buildid-cache. > Could you have a try below patch? > > diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c > index 72c124d..d3b5062 100644 > --- a/tools/perf/util/header.c > +++ b/tools/perf/util/header.c > @@ -271,11 +271,16 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, > const char *name, bool is_kallsyms) > { > const size_t size = PATH_MAX; > - char *realname = realpath(name, NULL), > + char *realname, > *filename = malloc(size), > *linkname = malloc(size), *targetname; > int len, err = -1; > > + if (is_kallsyms) > + realname = (char *)name; > + else > + realname = realpath(name, NULL); > + > if (realname == NULL || filename == NULL || linkname == NULL) > goto out_free; > > @@ -307,7 +312,8 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, > if (symlink(targetname, linkname) == 0) > err = 0; > out_free: > - free(realname); > + if (!is_kallsyms) > + free(realname); > free(filename); > free(linkname); > return err; > The patch didn't fix this problem. > > > Now please run: > > > > $ tar xvf perf.data.tar.bz2 -C ~/.debug > > > > wherever you need to run 'perf report' on. > > [root@intel-s3e36-01 perf]# ./perf --version > > perf version 2.6.38.rc6.166.g493f33 > > [root@intel-s3e36-01 perf]# ./perf buildid-list > > b2370e39ea2898c6e11c188e2f3879e4e3d6d1ef [kernel.kallsyms] > > dd95cb496ebc4ed922eeb5640965f1243fcfcd9a > > /lib/modules/2.6.32-118.el6.x86_64/kernel/fs/ext4/ext4.ko > > 9e1aca88b83308cec7574d74975fa6f7d654c96e /lib64/libc-2.12.so > > d880be15bf992b5fbcc629e6bbf1c747a928ddd5 /lib64/libglib-2.0.so.0.2200.5 > > d1b2ca4e1ec8f81ba820e5f1375d960107ac7e50 /usr/lib64/libstdc++.so.6.0.13 > > [root@intel-s3e36-01 perf]# > > > > -- > > Han Pingtian > > Quality Engineer > > hpt @ #kernel-qe > > Red Hat, Inc > > Freedom ... courage ... Commitment ... ACCOUNTABILITY > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > Please read the FAQ at http://www.tux.org/lkml/ > -- Han Pingtian Quality Engineer hpt @ #kernel-qe Red Hat, Inc Freedom ... courage ... Commitment ... ACCOUNTABILITY ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: perf archive warning 2011-03-02 8:53 ` Han Pingtian @ 2011-03-03 0:38 ` Lin Ming 2011-03-03 4:21 ` Han Pingtian 0 siblings, 1 reply; 6+ messages in thread From: Lin Ming @ 2011-03-03 0:38 UTC (permalink / raw) To: Han Pingtian Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo, Peter Zijlstra On Wed, 2011-03-02 at 16:53 +0800, Han Pingtian wrote: > On Wed, Mar 02, 2011 at 04:29:41PM +0800, Lin Ming wrote: > > > > > > root@intel-s3e36-01 perf]# ./perf-archive > > > tar: .build-id/b2/370e39ea2898c6e11c188e2f3879e4e3d6d1ef: Cannot stat: > > > No such file or directory > > > tar: .build-id/b2/370e39ea2898c6e11c188e2f3879e4e3d6d1ef: Cannot stat: > > > No such file or directory > > > tar: Exiting with failure status due to previous errors > > > > kernel.kallsyms is not created successfully in the buildid-cache. > > Could you have a try below patch? > > > > diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c > > index 72c124d..d3b5062 100644 > > --- a/tools/perf/util/header.c > > +++ b/tools/perf/util/header.c > > @@ -271,11 +271,16 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, > > const char *name, bool is_kallsyms) > > { > > const size_t size = PATH_MAX; > > - char *realname = realpath(name, NULL), > > + char *realname, > > *filename = malloc(size), > > *linkname = malloc(size), *targetname; > > int len, err = -1; > > > > + if (is_kallsyms) > > + realname = (char *)name; > > + else > > + realname = realpath(name, NULL); > > + > > if (realname == NULL || filename == NULL || linkname == NULL) > > goto out_free; > > > > @@ -307,7 +312,8 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, > > if (symlink(targetname, linkname) == 0) > > err = 0; > > out_free: > > - free(realname); > > + if (!is_kallsyms) > > + free(realname); > > free(filename); > > free(linkname); > > return err; > > > The patch didn't fix this problem. Did you re-run perf command? Need to re-run it to generate kernel.kallsyms build-id cache. For example, $ perf record -- sleep 3 $ perf-archive If the problem is still there, please attach below output: $ tree ~/.debug Thanks, Lin Ming > > > > > Now please run: > > > > > > $ tar xvf perf.data.tar.bz2 -C ~/.debug > > > > > > wherever you need to run 'perf report' on. > > > [root@intel-s3e36-01 perf]# ./perf --version > > > perf version 2.6.38.rc6.166.g493f33 > > > [root@intel-s3e36-01 perf]# ./perf buildid-list > > > b2370e39ea2898c6e11c188e2f3879e4e3d6d1ef [kernel.kallsyms] > > > dd95cb496ebc4ed922eeb5640965f1243fcfcd9a > > > /lib/modules/2.6.32-118.el6.x86_64/kernel/fs/ext4/ext4.ko > > > 9e1aca88b83308cec7574d74975fa6f7d654c96e /lib64/libc-2.12.so > > > d880be15bf992b5fbcc629e6bbf1c747a928ddd5 /lib64/libglib-2.0.so.0.2200.5 > > > d1b2ca4e1ec8f81ba820e5f1375d960107ac7e50 /usr/lib64/libstdc++.so.6.0.13 > > > [root@intel-s3e36-01 perf]# > > > > > > -- > > > Han Pingtian > > > Quality Engineer > > > hpt @ #kernel-qe > > > Red Hat, Inc > > > Freedom ... courage ... Commitment ... ACCOUNTABILITY > > > -- > > > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > > > the body of a message to majordomo@vger.kernel.org > > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > Please read the FAQ at http://www.tux.org/lkml/ > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: perf archive warning 2011-03-03 0:38 ` Lin Ming @ 2011-03-03 4:21 ` Han Pingtian 2011-03-03 4:21 ` Lin Ming 0 siblings, 1 reply; 6+ messages in thread From: Han Pingtian @ 2011-03-03 4:21 UTC (permalink / raw) To: Lin Ming Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo, Peter Zijlstra On Thu, Mar 03, 2011 at 08:38:25AM +0800, Lin Ming wrote: > On Wed, 2011-03-02 at 16:53 +0800, Han Pingtian wrote: > > On Wed, Mar 02, 2011 at 04:29:41PM +0800, Lin Ming wrote: > > > > > > > > root@intel-s3e36-01 perf]# ./perf-archive > > > > tar: .build-id/b2/370e39ea2898c6e11c188e2f3879e4e3d6d1ef: Cannot stat: > > > > No such file or directory > > > > tar: .build-id/b2/370e39ea2898c6e11c188e2f3879e4e3d6d1ef: Cannot stat: > > > > No such file or directory > > > > tar: Exiting with failure status due to previous errors > > > > > > kernel.kallsyms is not created successfully in the buildid-cache. > > > Could you have a try below patch? > > > > > > diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c > > > index 72c124d..d3b5062 100644 > > > --- a/tools/perf/util/header.c > > > +++ b/tools/perf/util/header.c > > > @@ -271,11 +271,16 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, > > > const char *name, bool is_kallsyms) > > > { > > > const size_t size = PATH_MAX; > > > - char *realname = realpath(name, NULL), > > > + char *realname, > > > *filename = malloc(size), > > > *linkname = malloc(size), *targetname; > > > int len, err = -1; > > > > > > + if (is_kallsyms) > > > + realname = (char *)name; > > > + else > > > + realname = realpath(name, NULL); > > > + > > > if (realname == NULL || filename == NULL || linkname == NULL) > > > goto out_free; > > > > > > @@ -307,7 +312,8 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, > > > if (symlink(targetname, linkname) == 0) > > > err = 0; > > > out_free: > > > - free(realname); > > > + if (!is_kallsyms) > > > + free(realname); > > > free(filename); > > > free(linkname); > > > return err; > > > > > The patch didn't fix this problem. > > Did you re-run perf command? > Need to re-run it to generate kernel.kallsyms build-id cache. > > For example, > > $ perf record -- sleep 3 > $ perf-archive I think I must do something wrong yesterday when testing your patch. It works just fine today, the problem has been fixed by it. Thanks! > > If the problem is still there, please attach below output: > > $ tree ~/.debug > > Thanks, > Lin Ming > > > > > > > > Now please run: > > > > > > > > $ tar xvf perf.data.tar.bz2 -C ~/.debug > > > > > > > > wherever you need to run 'perf report' on. > > > > [root@intel-s3e36-01 perf]# ./perf --version > > > > perf version 2.6.38.rc6.166.g493f33 > > > > [root@intel-s3e36-01 perf]# ./perf buildid-list > > > > b2370e39ea2898c6e11c188e2f3879e4e3d6d1ef [kernel.kallsyms] > > > > dd95cb496ebc4ed922eeb5640965f1243fcfcd9a > > > > /lib/modules/2.6.32-118.el6.x86_64/kernel/fs/ext4/ext4.ko > > > > 9e1aca88b83308cec7574d74975fa6f7d654c96e /lib64/libc-2.12.so > > > > d880be15bf992b5fbcc629e6bbf1c747a928ddd5 /lib64/libglib-2.0.so.0.2200.5 > > > > d1b2ca4e1ec8f81ba820e5f1375d960107ac7e50 /usr/lib64/libstdc++.so.6.0.13 > > > > [root@intel-s3e36-01 perf]# > > > > > > > > -- > > > > Han Pingtian > > > > Quality Engineer > > > > hpt @ #kernel-qe > > > > Red Hat, Inc > > > > Freedom ... courage ... Commitment ... ACCOUNTABILITY > > > > -- > > > > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > > > > the body of a message to majordomo@vger.kernel.org > > > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > Please read the FAQ at http://www.tux.org/lkml/ > > > > > > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Han Pingtian Quality Engineer hpt @ #kernel-qe Red Hat, Inc Freedom ... courage ... Commitment ... ACCOUNTABILITY ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: perf archive warning 2011-03-03 4:21 ` Han Pingtian @ 2011-03-03 4:21 ` Lin Ming 0 siblings, 0 replies; 6+ messages in thread From: Lin Ming @ 2011-03-03 4:21 UTC (permalink / raw) To: Han Pingtian Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo, Peter Zijlstra On Thu, 2011-03-03 at 12:21 +0800, Han Pingtian wrote: > On Thu, Mar 03, 2011 at 08:38:25AM +0800, Lin Ming wrote: > > On Wed, 2011-03-02 at 16:53 +0800, Han Pingtian wrote: > > > On Wed, Mar 02, 2011 at 04:29:41PM +0800, Lin Ming wrote: > > > > > > > > > > root@intel-s3e36-01 perf]# ./perf-archive > > > > > tar: .build-id/b2/370e39ea2898c6e11c188e2f3879e4e3d6d1ef: Cannot stat: > > > > > No such file or directory > > > > > tar: .build-id/b2/370e39ea2898c6e11c188e2f3879e4e3d6d1ef: Cannot stat: > > > > > No such file or directory > > > > > tar: Exiting with failure status due to previous errors > > > > > > > > kernel.kallsyms is not created successfully in the buildid-cache. > > > > Could you have a try below patch? > > > > > > > > diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c > > > > index 72c124d..d3b5062 100644 > > > > --- a/tools/perf/util/header.c > > > > +++ b/tools/perf/util/header.c > > > > @@ -271,11 +271,16 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, > > > > const char *name, bool is_kallsyms) > > > > { > > > > const size_t size = PATH_MAX; > > > > - char *realname = realpath(name, NULL), > > > > + char *realname, > > > > *filename = malloc(size), > > > > *linkname = malloc(size), *targetname; > > > > int len, err = -1; > > > > > > > > + if (is_kallsyms) > > > > + realname = (char *)name; > > > > + else > > > > + realname = realpath(name, NULL); > > > > + > > > > if (realname == NULL || filename == NULL || linkname == NULL) > > > > goto out_free; > > > > > > > > @@ -307,7 +312,8 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, > > > > if (symlink(targetname, linkname) == 0) > > > > err = 0; > > > > out_free: > > > > - free(realname); > > > > + if (!is_kallsyms) > > > > + free(realname); > > > > free(filename); > > > > free(linkname); > > > > return err; > > > > > > > The patch didn't fix this problem. > > > > Did you re-run perf command? > > Need to re-run it to generate kernel.kallsyms build-id cache. > > > > For example, > > > > $ perf record -- sleep 3 > > $ perf-archive > I think I must do something wrong yesterday when testing your patch. It > works just fine today, the problem has been fixed by it. Thanks! OK. I'll send out a patch with your Tested-by. Lin Ming ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-03-03 4:20 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-03-02 4:23 perf archive warning Han Pingtian [not found] ` <AANLkTim+Ls+_cbHnMzdfWAWUj0Wx2rQtnoTCjZJ8Cnro@mail.gmail.com> 2011-03-02 8:29 ` Lin Ming 2011-03-02 8:53 ` Han Pingtian 2011-03-03 0:38 ` Lin Ming 2011-03-03 4:21 ` Han Pingtian 2011-03-03 4:21 ` Lin Ming
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).