Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
perf/core improvements and fixes
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 49 of 49 - Collapse all  -  Translate all to Translated (View all originals) < Older 
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Arnaldo Carvalho de Melo  
View profile  
 More options Oct 26 2012, 12:32 pm
Newsgroups: fa.linux.kernel
From: Arnaldo Carvalho de Melo <a...@infradead.org>
Date: Fri, 26 Oct 2012 16:32:35 UTC
Local: Fri, Oct 26 2012 12:32 pm
Subject: Re: [GIT PULL 0/9] perf/core improvements and fixes
Em Fri, Oct 26, 2012 at 05:34:32PM +0200, Borislav Petkov escreveu:

> On Sat, Oct 27, 2012 at 12:31:42AM +0900, Namhyung Kim wrote:
> > You can see it easily when building perf without -j option. But I have
> > no idea why it takes so long..
> Well, you can trace that workload with perf itself, no, and see the
> hotspots.

Right, perf'ing perf is a favourite pastime, right?

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arnaldo Carvalho de Melo  
View profile  
 More options Oct 26 2012, 1:06 pm
Newsgroups: fa.linux.kernel
From: Arnaldo Carvalho de Melo <a...@infradead.org>
Date: Fri, 26 Oct 2012 17:06:01 UTC
Local: Fri, Oct 26 2012 1:06 pm
Subject: Re: [GIT PULL 0/9] perf/core improvements and fixes
Em Fri, Oct 26, 2012 at 04:54:51PM +0200, Ingo Molnar escreveu:

> * Arnaldo Carvalho de Melo <a...@infradead.org> wrote:
> > . Makefile improvements from Namhyung Kim.

> These are really useful: there used to be a couple of seconds of
> wait time at the beginning of every perf build - these are now
> nicely explained with the various CHK entries.

The optimal way, I guess, would be to have some cache file with the
results of such feature tests, that would be created and then used till
the build fails using its findings, which would trigger a new feature
check round, followed by an automatic rebuild.

That would be tricky because we would have to have an automated way of
discovering if the build failed due to missing packages or if it failed
due to some ordinary coding mistake.

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Borislav Petkov  
View profile  
 More options Oct 26 2012, 1:20 pm
Newsgroups: fa.linux.kernel
From: Borislav Petkov <b...@alien8.de>
Date: Fri, 26 Oct 2012 17:20:28 UTC
Local: Fri, Oct 26 2012 1:20 pm
Subject: Re: [GIT PULL 0/9] perf/core improvements and fixes
On Fri, Oct 26, 2012 at 09:31:15AM -0700, Arnaldo Carvalho de Melo wrote:

> Right, perf'ing perf is a favourite pastime, right?

Sure, can I get "perfing perf" on a T-shirt please?

--
Regards/Gruss,
    Boris.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Namhyung Kim  
View profile  
 More options Oct 27 2012, 5:17 am
Newsgroups: fa.linux.kernel
From: Namhyung Kim <namhy...@kernel.org>
Date: Sat, 27 Oct 2012 09:17:00 UTC
Subject: Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-26 (금), 19:20 +0200, Borislav Petkov:

> On Fri, Oct 26, 2012 at 09:31:15AM -0700, Arnaldo Carvalho de Melo wrote:
> > Right, perf'ing perf is a favourite pastime, right?

> Sure, can I get "perfing perf" on a T-shirt please?

Well, guys, this is not perfing perf.  It's about perfing make and/or
gcc.  Anyway I'd also like to get a "perfing perf" T-shirt. ;)

Thanks,
Namhyung

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ingo Molnar  
View profile  
 More options Oct 27 2012, 9:19 am
Newsgroups: fa.linux.kernel
From: Ingo Molnar <mi...@kernel.org>
Date: Sat, 27 Oct 2012 13:19:47 UTC
Local: Sat, Oct 27 2012 9:19 am
Subject: Re: [GIT PULL 0/9] perf/core improvements and fixes

* Arnaldo Carvalho de Melo <a...@infradead.org> wrote:

The feature tests aren't a big problem right now - but making it
*visible* is really useful. It also tells us which feature test
fails, etc.

Thanks,

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "'git describe' is very slow on development trees with lots of commits" by Ingo Molnar
Ingo Molnar  
View profile  
 More options Oct 27 2012, 9:34 am
Newsgroups: fa.linux.kernel
From: Ingo Molnar <mi...@kernel.org>
Date: Sat, 27 Oct 2012 13:34:03 UTC
Local: Sat, Oct 27 2012 9:34 am
Subject: 'git describe' is very slow on development trees with lots of commits

(Cc:-ed the Git development list.)

* David Ahern <dsah...@gmail.com> wrote:

> PERF-VERSION-GEN and specifically the git commands are the
> cause of more delay than the config checks, especially when
> doing the build in a VM with the kernel source on an NFS
> mount.

Yes, I have noticed that too.

So, the problem is that we use 'git describe' on the kernel tree
to generate the version string, which is very, very slow if we
are far away from any tagged release - which is the case for the
-tip tree:

 comet:~/tip> perf stat --null --repeat 3 git describe
 v3.7-rc2-2007-g83e8223
 v3.7-rc2-2007-g83e8223
 v3.7-rc2-2007-g83e8223

'git describe' is much faster if we are on or near to a tag:

 $ git checkout v3.6
 $ perf stat --null --repeat 3 git describe
 v3.6
 v3.6
 v3.6

 Performance counter stats for 'git describe' (3 runs):

       0.020171640 seconds time elapsed                                          ( +-  3.64% )

 $ git checkout b34e5f55a1e6

 $ perf stat --null --repeat 3 git describe
 v3.6-41-gb34e5f5
 v3.6-41-gb34e5f5
 v3.6-41-gb34e5f5

 Performance counter stats for 'git describe' (3 runs):

       0.155603676 seconds time elapsed                                          ( +-  0.23% )

The cost on this pretty fast machine is about 1 msecs per commit
- which adds up to about 2.5 seconds during much of the
development cycle.

So maybe we should be using a different version string, for
example, instead of:

 v3.7-rc2-2007-g83e8223

this would be perfectly fine:

 v3.7-rc2-g83e8223

the 'commit count' is informative but not essential - and in
counting the number of off-tag commits is where much of the
overhead is:

#
# Overhead  Command       Shared Object                                      Symbol
# ........  .......  ..................  ..........................................
#
    39.79%      git  libz.so.1.2.5       [.] 0x000000000000c1fe                    
    26.39%      git  libz.so.1.2.5       [.] inflate                              
    22.42%      git  git                 [.] 0x000000000009bd1e                    
     2.99%      git  libz.so.1.2.5       [.] adler32                              
     1.23%      git  libc-2.15.so        [.] _int_malloc                          
     0.72%      git  libc-2.15.so        [.] __GI_____strtoull_l_internal          
     0.67%      git  libc-2.15.so        [.] _int_free                            
     0.62%      git  libc-2.15.so        [.] malloc_consolidate                    
     0.54%      git  [kernel.kallsyms]   [k] clear_page_c                          
     0.32%      git  [kernel.kallsyms]   [k] page_fault                            

So by switching to the shorter version string that still embedds
the tag and the exact sha1 we'd be able to run this script a
*lot* faster.

Thanks,

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "perf/core improvements and fixes" by Arnaldo Carvalho de Melo
Arnaldo Carvalho de Melo  
View profile  
 More options Oct 27 2012, 10:30 am
Newsgroups: fa.linux.kernel
From: Arnaldo Carvalho de Melo <a...@infradead.org>
Date: Sat, 27 Oct 2012 14:30:26 UTC
Local: Sat, Oct 27 2012 10:30 am
Subject: Re: [GIT PULL 0/9] perf/core improvements and fixes
Em Sat, Oct 27, 2012 at 06:16:31PM +0900, Namhyung Kim escreveu:

> 2012-10-26 (금), 19:20 +0200, Borislav Petkov:
> > On Fri, Oct 26, 2012 at 09:31:15AM -0700, Arnaldo Carvalho de Melo wrote:
> > > Right, perf'ing perf is a favourite pastime, right?

> > Sure, can I get "perfing perf" on a T-shirt please?

> Well, guys, this is not perfing perf.  It's about perfing make and/or
> gcc.  Anyway I'd also like to get a "perfing perf" T-shirt. ;)

Well, building perf faster will allow us to perf perf faster. ;-)

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
stephane eranian  
View profile  
 More options Oct 27 2012, 1:12 pm
Newsgroups: fa.linux.kernel
From: stephane eranian <eran...@googlemail.com>
Date: Sat, 27 Oct 2012 17:12:15 UTC
Local: Sat, Oct 27 2012 1:12 pm
Subject: Re: [GIT PULL 0/9] perf/core improvements and fixes

Yes, I see that delay on copiling builtin-sched.c on my IVB system.
Don't know why it takes a significant number of seconds to compile
this file. It did not use to be like that a few revisions back. It takes
about 8 seconds on my OC'd IVB (> 4GHz).  I don't see much code
in that file.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ingo Molnar  
View profile  
 More options Oct 30 2012, 4:18 am
Newsgroups: fa.linux.kernel
From: Ingo Molnar <mi...@kernel.org>
Date: Tue, 30 Oct 2012 08:18:42 UTC
Local: Tues, Oct 30 2012 4:18 am
Subject: Re: [GIT PULL 0/9] perf/core improvements and fixes

* Ingo Molnar <mi...@kernel.org> wrote:

Btw., there's another thing that would be nice in addition to
simplifying the PERF-VERSION-GEN script: to be able to run the
CHK tests in parallel, like the object file runes.

Right now the CHK tests are serialized and they take several
seconds to build and run. A parallel make rule would reduce
that to about a second I think.

Thanks,

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Zijlstra  
View profile  
 More options Oct 30 2012, 4:22 am
Newsgroups: fa.linux.kernel
From: Peter Zijlstra <a.p.zijls...@chello.nl>
Date: Tue, 30 Oct 2012 08:22:14 UTC
Local: Tues, Oct 30 2012 4:22 am
Subject: Re: [GIT PULL 0/9] perf/core improvements and fixes

On Tue, 2012-10-30 at 09:18 +0100, Ingo Molnar wrote:
> > > The optimal way, I guess, would be to have some cache file
> > > with the results of such feature tests, that would be created
> > > and then used till the build fails using its findings, which
> > > would trigger a new feature check round, followed by an
> > > automatic rebuild.

autoconf!! ;-)

/me runs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "perf tools: Speed up the perf build time by simplifying the perf --version string generation" by Ingo Molnar
Ingo Molnar  
View profile  
 More options Oct 30 2012, 4:46 am
Newsgroups: fa.linux.kernel
From: Ingo Molnar <mi...@kernel.org>
Date: Tue, 30 Oct 2012 08:46:16 UTC
Local: Tues, Oct 30 2012 4:46 am
Subject: [PATCH] perf tools: Speed up the perf build time by simplifying the perf --version string generation

* Ingo Molnar <mi...@kernel.org> wrote:

> Btw., there's another thing that would be nice in addition to
> simplifying the PERF-VERSION-GEN script: [...]

Here's a stab at that.

----------------->

Building perf is pretty slow on trees that have a lot of commits
relative to the nearest Git tag. This slowness manifests itself
during version string generation:

 $ perf stat --null --repeat 3 --sync --pre "rm -f PERF-VERSION-FILE" util/PERF-VERSION-GEN
 PERF_VERSION = 3.7.rc3.1458.g5399b3b
 PERF_VERSION = 3.7.rc3.1458.g5399b3b
 PERF_VERSION = 3.7.rc3.1458.g5399b3b

 Performance counter stats for 'util/PERF-VERSION-GEN' (3 runs):

       2.857503976 seconds time elapsed                                          ( +-  0.22% )

The build can be even slower than that, when one over NFS
volumes.

The reason for the slowness is that util/PERF-VERSION-GEN uses
"git describe" to generate the string, which has to count the
"number of commits distance" from the nearest tag - the ".1458."
count in the output above. For that Git had to extract and
decompress 1458 Git objects, which takes time and bandwidth.

But this "number of commits" value is mostly irrelevant in
practice. We either want to know an approximate tag name, or we
want to know the precise sha1.

So this patch simplifies the version string to:

 PERF_VERSION = 3.7.rc3.g5399b3b.dirty

which speeds up the version string generation script by an order
of magnitude:

 $ perf stat --null --repeat 3 --sync --pre "rm -f PERF-VERSION-FILE" util/PERF-VERSION-GEN
 PERF_VERSION = 3.7.rc3.g5399b3b.dirty
 PERF_VERSION = 3.7.rc3.g5399b3b.dirty
 PERF_VERSION = 3.7.rc3.g5399b3b.dirty

 Performance counter stats for 'util/PERF-VERSION-GEN' (3 runs):

       0.307633559 seconds time elapsed                                          ( +-  0.84% )

Signed-off-by: Ingo Molnar <mi...@kernel.org>
---
 tools/perf/util/PERF-VERSION-GEN | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN
index 95264f3..c774b89 100755
--- a/tools/perf/util/PERF-VERSION-GEN
+++ b/tools/perf/util/PERF-VERSION-GEN
@@ -12,7 +12,7 @@ LF='
 # First check if there is a .git to get the version from git describe
 # otherwise try to get the version from the kernel makefile
 if test -d ../../.git -o -f ../../.git &&
-       VN=$(git describe --match 'v[0-9].[0-9]*' --abbrev=4 HEAD 2>/dev/null) &&
+       VN=$(echo $(git tag --list "v[0-9].[0-9]*" | tail -1)"-g"$(git log -1 --abbrev=4 --pretty=format:"%h" HEAD) 2>/dev/null) &&
        case "$VN" in
        *$LF*) (exit 1) ;;
        v[0-9]*)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "perf tools: Further speed up the perf build" by Ingo Molnar
Ingo Molnar  
View profile  
 More options Oct 30 2012, 4:54 am
Newsgroups: fa.linux.kernel
From: Ingo Molnar <mi...@kernel.org>
Date: Tue, 30 Oct 2012 08:54:54 UTC
Local: Tues, Oct 30 2012 4:54 am
Subject: [PATCH] perf tools: Further speed up the perf build
There's another source of overhead in the perf version string
generator:

   git update-index -q --refresh

.. which will iterate the whole checked out tree. This can be
pretty slow on NFS volumes, but takes some time even with local
SSD disks and a fully cached kernel tree:

 $ perf stat --null --repeat 3 --pre "rm -f PERF-VERSION-FILE" util/PERF-VERSION-GEN
 PERF_VERSION = 3.7.rc3.g5399b3b.dirty
 PERF_VERSION = 3.7.rc3.g5399b3b.dirty
 PERF_VERSION = 3.7.rc3.g5399b3b.dirty

 Performance counter stats for 'util/PERF-VERSION-GEN' (3 runs):

       0.306999221 seconds time elapsed                                          ( +-  0.56% )

So remove the .dirty differentiator as well - it adds little
information because locally patched git trees are common, but
seldom are the perf tools modified.

So a lot of version strings are reported as 'dirty' while in
fact they are pristine perf builds. For example 99% of my perf
builds are not patched but the kernel tree is slightly patched,
which adds the .dirty tag.

Eliminating that tag speeds up version generation by another
order of magnitude:

 $ perf stat --null --repeat 3 --sync --pre "rm -f PERF-VERSION-FILE" util/PERF-VERSION-GEN
 PERF_VERSION = 3.7.rc3.g4b0bd3
 PERF_VERSION = 3.7.rc3.g4b0bd3
 PERF_VERSION = 3.7.rc3.g4b0bd3

 Performance counter stats for 'util/PERF-VERSION-GEN' (3 runs):

       0.021270923 seconds time elapsed                                          ( +-  1.94% )

(Also clean up some of the comments around this code.)

Signed-off-by: Ingo Molnar <mi...@kernel.org>
---
 tools/perf/util/PERF-VERSION-GEN | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN
index c774b89..6fb1cc8 100755
--- a/tools/perf/util/PERF-VERSION-GEN
+++ b/tools/perf/util/PERF-VERSION-GEN
@@ -9,17 +9,12 @@ GVF=${OUTPUT}PERF-VERSION-FILE
 LF='
 '

+#
 # First check if there is a .git to get the version from git describe
-# otherwise try to get the version from the kernel makefile
+# otherwise try to get the version from the kernel Makefile
+#
 if test -d ../../.git -o -f ../../.git &&
-       VN=$(echo $(git tag --list "v[0-9].[0-9]*" | tail -1)"-g"$(git log -1 --abbrev=4 --pretty=format:"%h" HEAD) 2>/dev/null) &&
-       case "$VN" in
-       *$LF*) (exit 1) ;;
-       v[0-9]*)
-               git update-index -q --refresh
-               test -z "$(git diff-index --name-only HEAD --)" ||
-               VN="$VN-dirty" ;;
-       esac
+       VN=$(echo $(git tag --list "v[0-9].[0-9]*" | tail -1)"-g"$(git log -1 --abbrev=4 --pretty=format:"%h" HEAD) 2>/dev/null)
 then
        VN=$(echo "$VN" | sed -e 's/-/./g');
 else
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "perf/core improvements and fixes" by Ingo Molnar
Ingo Molnar  
View profile  
 More options Oct 30 2012, 5:14 am
Newsgroups: fa.linux.kernel
From: Ingo Molnar <mi...@kernel.org>
Date: Tue, 30 Oct 2012 09:14:55 UTC
Local: Tues, Oct 30 2012 5:14 am
Subject: Re: [GIT PULL 0/9] perf/core improvements and fixes

* Peter Zijlstra <a.p.zijls...@chello.nl> wrote:

> On Tue, 2012-10-30 at 09:18 +0100, Ingo Molnar wrote:
> > > > The optimal way, I guess, would be to have some cache file
> > > > with the results of such feature tests, that would be created
> > > > and then used till the build fails using its findings, which
> > > > would trigger a new feature check round, followed by an
> > > > automatic rebuild.

I did not write that.

I think making the feature tests parallel would be enough to
speed it all up - caching brings in a new set of problems. The
tests are mostly independent and the feature test makefile rules
could be parallelized like the object file rules.

> autoconf!! ;-)

> /me runs

hey, we build perf much faster than autoconf's 'configure'
script finishes running ;-)

Thanks,

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "perf tools: Speed up the perf build time by simplifying the perf --version string generation" by Arnaldo Carvalho de Melo
Arnaldo Carvalho de Melo  
View profile  
 More options Oct 30 2012, 5:35 am
Newsgroups: fa.linux.kernel
From: Arnaldo Carvalho de Melo <a...@infradead.org>
Date: Tue, 30 Oct 2012 09:35:45 UTC
Local: Tues, Oct 30 2012 5:35 am
Subject: Re: [PATCH] perf tools: Speed up the perf build time by simplifying the perf --version string generation
Em Tue, Oct 30, 2012 at 09:46:00AM +0100, Ingo Molnar escreveu:

> +++ b/tools/perf/util/PERF-VERSION-GEN
> @@ -12,7 +12,7 @@ LF='
>  # First check if there is a .git to get the version from git describe
>  # otherwise try to get the version from the kernel makefile
>  if test -d ../../.git -o -f ../../.git &&
> -  VN=$(git describe --match 'v[0-9].[0-9]*' --abbrev=4 HEAD 2>/dev/null) &&
> +  VN=$(echo $(git tag --list "v[0-9].[0-9]*" | tail -1)"-g"$(git log -1 --abbrev=4 --pretty=format:"%h" HEAD) 2>/dev/null) &&

[acme@sandy linux]$ make -j8 -C tools/perf/ O=/home/acme/git/build/perf install
make: Entering directory `/home/git/linux/tools/perf'
error: unknown option `list'
usage: git tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname>
[<head>]

<SNIP>

[acme@sandy linux]$ git --version
git version 1.7.1

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ingo Molnar  
View profile  
 More options Oct 30 2012, 5:43 am
Newsgroups: fa.linux.kernel
From: Ingo Molnar <mi...@kernel.org>
Date: Tue, 30 Oct 2012 09:43:50 UTC
Local: Tues, Oct 30 2012 5:43 am
Subject: Re: [PATCH] perf tools: Speed up the perf build time by simplifying the perf --version string generation

* Arnaldo Carvalho de Melo <a...@infradead.org> wrote:

Does -l work?

Alternatively, please replace:

  git tag --list "v[0-9].[0-9]*" | tail -1

with:

  git tag | tail -1 | grep -E "v[0-9].[0-9]*"

which is just as fast.

Thanks,

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ingo Molnar  
View profile  
 More options Oct 30 2012, 5:49 am
Newsgroups: fa.linux.kernel
From: Ingo Molnar <mi...@kernel.org>
Date: Tue, 30 Oct 2012 09:49:04 UTC
Local: Tues, Oct 30 2012 5:49 am
Subject: Re: [PATCH] perf tools: Speed up the perf build time by simplifying the perf --version string generation

* Ingo Molnar <mi...@kernel.org> wrote:

> Does -l work?

> Alternatively, please replace:

>   git tag --list "v[0-9].[0-9]*" | tail -1

> with:

>   git tag | tail -1 | grep -E "v[0-9].[0-9]*"

> which is just as fast.

make that:

    git tag 2>/dev/null | tail -1 | grep -E "v[0-9].[0-9]*"

this will work silently even if Git is not installed.

Thanks,

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arnaldo Carvalho de Melo  
View profile  
 More options Oct 30 2012, 5:50 am
Newsgroups: fa.linux.kernel
From: Arnaldo Carvalho de Melo <a...@infradead.org>
Date: Tue, 30 Oct 2012 09:50:05 UTC
Local: Tues, Oct 30 2012 5:50 am
Subject: Re: [PATCH] perf tools: Speed up the perf build time by simplifying the perf --version string generation
Em Tue, Oct 30, 2012 at 10:43:38AM +0100, Ingo Molnar escreveu:

Yes, changed that and applied, thanks!

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arnaldo Carvalho de Melo  
View profile  
 More options Oct 30 2012, 5:58 am
Newsgroups: fa.linux.kernel
From: Arnaldo Carvalho de Melo <a...@infradead.org>
Date: Tue, 30 Oct 2012 09:58:15 UTC
Local: Tues, Oct 30 2012 5:58 am
Subject: Re: [PATCH] perf tools: Speed up the perf build time by simplifying the perf --version string generation
Em Tue, Oct 30, 2012 at 10:48:52AM +0100, Ingo Molnar escreveu:

But we first check if we have a .git, that doesn't guarantees that git
is installed, but makes it a lot likely, no? Redirecting stderr to null
would need to be done in more places, so we would need to use something
like what we do for xmlto/asciidoc, $(call get-executable,$(GIT))

#
# First check if there is a .git to get the version from git describe
# otherwise try to get the version from the kernel Makefile
#
if test -d ../../.git -o -f ../../.git &&
        VN=$(echo $(git tag -l "v[0-9].[0-9]*" | tail -1)"-g"$(git log -1 --abbrev=4 --pretty=format:"%h" HEAD) 2>/dev/null)
then
        VN=$(echo "$VN" | sed -e 's/-/./g');
else
        VN=$(MAKEFLAGS= make -sC ../.. kernelversion)
fi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ingo Molnar  
View profile  
 More options Oct 30 2012, 6:01 am
Newsgroups: fa.linux.kernel
From: Ingo Molnar <mi...@kernel.org>
Date: Tue, 30 Oct 2012 10:01:48 UTC
Local: Tues, Oct 30 2012 6:01 am
Subject: Re: [PATCH] perf tools: Speed up the perf build time by simplifying the perf --version string generation

* Arnaldo Carvalho de Melo <a...@infradead.org> wrote:

Not necessarily - say a home directory is NFS shared to multiple
test boxes, one does not have Git installed.

> Redirecting stderr to null would need to be done in more
> places, so we would need to use something like what we do for
> xmlto/asciidoc, $(call get-executable,$(GIT))

It at least solves it in this particular case, and I tested it
with Git uninstalled, there's no extra message just a proper
error code the script can use to fall back to the toplevel
Makefile for version info.

Thanks,

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "perf/core improvements and fixes" by Arnaldo Carvalho de Melo
Arnaldo Carvalho de Melo  
View profile  
 More options Oct 31 2012, 10:49 am
Newsgroups: fa.linux.kernel
From: Arnaldo Carvalho de Melo <a...@infradead.org>
Date: Wed, 31 Oct 2012 14:49:41 UTC
Local: Wed, Oct 31 2012 10:49 am
Subject: [GIT PULL 0/6] perf/core improvements and fixes
Hi Ingo,

        Please consider pulling,

- Arnaldo

The following changes since commit 95d18aa2b6c05351181934b3bc34ce038cc7b637:

  perf/x86: Fix sparse warnings (2012-10-30 10:10:52 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo

for you to fetch changes up to ffadcf090d468e9c4938b718649f38dd10cfdb02:

  perf annotate: Handle XBEGIN like a jump (2012-10-31 12:18:26 -0200)

----------------------------------------------------------------
perf/core improvements and fixes

 Handle XBEGIN like a jump in the annotate browser, from Andi Kleen

 Build speedups for --version, from Ingo Molnar.

 Add info about cross compiling for Android ARM, from Joonsoo Kim.

 Warn about missing libelf, from Namhyung Kim.

Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com>

----------------------------------------------------------------
Andi Kleen (1):
      perf annotate: Handle XBEGIN like a jump

Arnaldo Carvalho de Melo (1):
      perf tools: Handle --version string generation on machines without git

Ingo Molnar (2):
      perf tools: Speed up the perf build time by simplifying the perf --version string generation
      perf tools: Further speed up the perf build

Joonsoo Kim (1):
      perf tools: Add info about cross compiling for Android ARM

Namhyung Kim (1):
      perf tools: Warn about missing libelf

 tools/perf/Documentation/android.txt |    5 ++++-
 tools/perf/Makefile                  |    2 ++
 tools/perf/util/PERF-VERSION-GEN     |   14 +++++---------
 tools/perf/util/annotate.c           |    2 ++
 4 files changed, 13 insertions(+), 10 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "'git describe' is very slow on development trees with lots of commits" by Pavel Machek
Pavel Machek  
View profile  
 More options Oct 31 2012, 1:52 pm
Newsgroups: fa.linux.kernel
From: Pavel Machek <pa...@ucw.cz>
Date: Wed, 31 Oct 2012 17:52:32 UTC
Local: Wed, Oct 31 2012 1:52 pm
Subject: Re: 'git describe' is very slow on development trees with lots of commits
Hi!

> (Cc:-ed the Git development list.)

> * David Ahern <dsah...@gmail.com> wrote:

> > PERF-VERSION-GEN and specifically the git commands are the
> > cause of more delay than the config checks, especially when
> > doing the build in a VM with the kernel source on an NFS
> > mount.

> Yes, I have noticed that too.
...
> The cost on this pretty fast machine is about 1 msecs per commit
> - which adds up to about 2.5 seconds during much of the
> development cycle.

Well... I noticed my builds when little changed are very slow... and
it was due to the computation of version string. Ouch.

pavel@amd:~/mainline-altera/linux$ time git describe
fixes-for-linus-506-g71ca8691
0.68user 0.22system 27.82 (0m27.820s) elapsed 3.26%CPU
pavel@amd:~/mainline-altera/linux$

(Cached it is more reasonable 3 seconds, but it keeps going out of
cache all the time. Uncached clean build is 3 minutes, cached is 9
seconds + time to do git describe).

Thikpad X60.

                                                                        Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "perf/core improvements and fixes" by Arnaldo Carvalho de Melo
Arnaldo Carvalho de Melo  
View profile  
 More options Nov 5 2012, 12:24 pm
Newsgroups: fa.linux.kernel
From: Arnaldo Carvalho de Melo <a...@infradead.org>
Date: Mon, 05 Nov 2012 17:24:20 UTC
Local: Mon, Nov 5 2012 12:24 pm
Subject: [GIT PULL 00/32] perf/core improvements and fixes
Hi Ingo,

        Please consider pulling, on top of a previous pull request.

- Arnaldo

The following changes since commit ffadcf090d468e9c4938b718649f38dd10cfdb02:

  perf annotate: Handle XBEGIN like a jump (2012-10-31 12:18:26 -0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo

for you to fetch changes up to 8dfec403e39b7c37fd6e8813bacc01da1e1210ab:

  perf tests: Removing 'optional' field (2012-11-05 14:03:59 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

 Don't show scripts menu for 'perf top', fix from Feng Tang

 Add framework for automated perf_event_attr tests, where tools with different
  command line options will be run from a 'perf test', via python glue, and the
  perf syscall will be intercepted to verify that the perf_event_attr fields
  set by the tool are those expected, from Jiri Olsa

 Use normalized arch name for searching objdump path. This fixes cases
  where the system's objdump (e.g. x86_64) supports the architecture in
  the perf.data file (e.g. i686), but is not the same, fix from Namhyung Kim.

 Postpone objdump check until annotation requested, from Namhyung Kim.

Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com>

----------------------------------------------------------------
Feng Tang (1):
      perf browser: Don't show scripts menu for 'perf top'

Jiri Olsa (28):
      perf tools: Remove BINDIR define from exec_cmd.o compilation
      perf tests: Move test objects into 'tests' directory
      perf tests: Add framework for automated perf_event_attr tests
      perf tests: Add attr record basic test
      perf tests: Add attr tests under builtin test command
      perf tests: Add attr record group test
      perf tests: Add attr record event syntax group test
      perf tests: Add attr record freq test
      perf tests: Add attr record count test
      perf tests: Add attr record graph test
      perf tests: Add attr record period test
      perf tests: Add attr record no samples test
      perf tests: Add attr record no-inherit test
      perf tests: Add attr record data test
      perf tests: Add attr record raw test
      perf tests: Add attr record no delay test
      perf tests: Add attr record branch any test
      perf tests: Add attr record branch filter tests
      perf tests: Add attr stat no-inherit test
      perf tests: Add attr stat group test
      perf tests: Add attr stat event syntax group test
      perf tests: Add attr stat default test
      perf tests: Add attr stat default test
      perf tests: Add documentation for attr tests
      perf tests: Add missing attr stat basic test
      perf tests: Factor attr tests WRITE_ASS macro
      perf tests: Fix attr watermark field name typo
      perf tests: Removing 'optional' field

Namhyung Kim (3):
      perf tools: Use normalized arch name for searching objdump path
      perf tools: Introduce struct hist_browser_timer
      perf report: Postpone objdump check until annotation requested

 tools/perf/Makefile                                |   20 +-
 tools/perf/arch/common.c                           |   40 ++-
 tools/perf/builtin-annotate.c                      |    2 +-
 tools/perf/builtin-report.c                        |   11 +-
 tools/perf/builtin-top.c                           |   10 +-
 tools/perf/perf.c                                  |    2 +
 tools/perf/perf.h                                  |   17 +-
 tools/perf/tests/attr.c                            |  174 +++++++++++
 tools/perf/tests/attr.py                           |  320 ++++++++++++++++++++
 tools/perf/tests/attr/README                       |   64 ++++
 tools/perf/tests/attr/base-record                  |   39 +++
 tools/perf/tests/attr/base-stat                    |   39 +++
 tools/perf/tests/attr/test-record-basic            |    5 +
 tools/perf/tests/attr/test-record-branch-any       |    8 +
 .../perf/tests/attr/test-record-branch-filter-any  |    8 +
 .../tests/attr/test-record-branch-filter-any_call  |    8 +
 .../tests/attr/test-record-branch-filter-any_ret   |    8 +
 tools/perf/tests/attr/test-record-branch-filter-hv |    8 +
 .../tests/attr/test-record-branch-filter-ind_call  |    8 +
 tools/perf/tests/attr/test-record-branch-filter-k  |    8 +
 tools/perf/tests/attr/test-record-branch-filter-u  |    8 +
 tools/perf/tests/attr/test-record-count            |    8 +
 tools/perf/tests/attr/test-record-data             |    8 +
 tools/perf/tests/attr/test-record-freq             |    6 +
 tools/perf/tests/attr/test-record-graph-default    |    6 +
 tools/perf/tests/attr/test-record-graph-dwarf      |   10 +
 tools/perf/tests/attr/test-record-graph-fp         |    6 +
 tools/perf/tests/attr/test-record-group            |   17 ++
 tools/perf/tests/attr/test-record-group1           |   20 ++
 tools/perf/tests/attr/test-record-no-delay         |    9 +
 tools/perf/tests/attr/test-record-no-inherit       |    7 +
 tools/perf/tests/attr/test-record-no-samples       |    6 +
 tools/perf/tests/attr/test-record-period           |    7 +
 tools/perf/tests/attr/test-record-raw              |    7 +
 tools/perf/tests/attr/test-stat-basic              |    6 +
 tools/perf/tests/attr/test-stat-default            |   64 ++++
 tools/perf/tests/attr/test-stat-detailed-1         |  101 ++++++
 tools/perf/tests/attr/test-stat-detailed-2         |  155 ++++++++++
 tools/perf/tests/attr/test-stat-detailed-3         |  173 +++++++++++
 tools/perf/tests/attr/test-stat-group              |   15 +
 tools/perf/tests/attr/test-stat-group1             |   17 ++
 tools/perf/tests/attr/test-stat-no-inherit         |    7 +
 tools/perf/{ => tests}/builtin-test.c              |   12 +-
 .../{util/dso-test-data.c => tests/dso-data.c}     |    0
 .../parse-events-test.c => tests/parse-events.c}   |    0
 tools/perf/ui/browsers/annotate.c                  |   27 +-
 tools/perf/ui/browsers/hists.c                     |   63 ++--
 tools/perf/ui/gtk/browser.c                        |    4 +-
 tools/perf/util/annotate.h                         |    8 +-
 tools/perf/util/hist.h                             |   31 +-
 50 files changed, 1515 insertions(+), 92 deletions(-)
 create mode 100644 tools/perf/tests/attr.c
 create mode 100644 tools/perf/tests/attr.py
 create mode 100644 tools/perf/tests/attr/README
 create mode 100644 tools/perf/tests/attr/base-record
 create mode 100644 tools/perf/tests/attr/base-stat
 create mode 100644 tools/perf/tests/attr/test-record-basic
 create mode 100644 tools/perf/tests/attr/test-record-branch-any
 create mode 100644 tools/perf/tests/attr/test-record-branch-filter-any
 create mode 100644 tools/perf/tests/attr/test-record-branch-filter-any_call
 create mode 100644 tools/perf/tests/attr/test-record-branch-filter-any_ret
 create mode 100644 tools/perf/tests/attr/test-record-branch-filter-hv
 create mode 100644 tools/perf/tests/attr/test-record-branch-filter-ind_call
 create mode 100644 tools/perf/tests/attr/test-record-branch-filter-k
 create mode 100644 tools/perf/tests/attr/test-record-branch-filter-u
 create mode 100644 tools/perf/tests/attr/test-record-count
 create mode 100644 tools/perf/tests/attr/test-record-data
 create mode 100644 tools/perf/tests/attr/test-record-freq
 create mode 100644 tools/perf/tests/attr/test-record-graph-default
 create mode 100644 tools/perf/tests/attr/test-record-graph-dwarf
 create mode 100644 tools/perf/tests/attr/test-record-graph-fp
 create mode 100644 tools/perf/tests/attr/test-record-group
 create mode 100644 tools/perf/tests/attr/test-record-group1
 create mode 100644 tools/perf/tests/attr/test-record-no-delay
 create mode 100644 tools/perf/tests/attr/test-record-no-inherit
 create mode 100644 tools/perf/tests/attr/test-record-no-samples
 create mode 100644 tools/perf/tests/attr/test-record-period
 create mode 100644 tools/perf/tests/attr/test-record-raw
 create mode 100644 tools/perf/tests/attr/test-stat-basic
 create mode 100644 tools/perf/tests/attr/test-stat-default
 create mode 100644 tools/perf/tests/attr/test-stat-detailed-1
 create mode 100644 tools/perf/tests/attr/test-stat-detailed-2
 create mode 100644 tools/perf/tests/attr/test-stat-detailed-3
 create mode 100644 tools/perf/tests/attr/test-stat-group
 create mode 100644 tools/perf/tests/attr/test-stat-group1
 create mode 100644 tools/perf/tests/attr/test-stat-no-inherit
 rename tools/perf/{ => tests}/builtin-test.c (99%)
 rename tools/perf/{util/dso-test-data.c => tests/dso-data.c} (100%)
 rename tools/perf/{util/parse-events-test.c => tests/parse-events.c} (100%)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "perf tools: Speed up the perf build time by simplifying the perf --version string generation" by tip-bot for Ingo Molnar
tip-bot for Ingo Molnar  
View profile  
 More options Nov 14 2012, 1:33 am
Newsgroups: fa.linux.kernel
From: tip-bot for Ingo Molnar <mi...@kernel.org>
Date: Wed, 14 Nov 2012 06:33:50 UTC
Local: Wed, Nov 14 2012 1:33 am
Subject: [tip:perf/core] perf tools: Speed up the perf build time by simplifying the perf --version string generation
Commit-ID:  acddedfba0df1e47fa99035a04661082b679ee9c
Gitweb:     http://git.kernel.org/tip/acddedfba0df1e47fa99035a04661082b679ee9c
Author:     Ingo Molnar <mi...@kernel.org>
AuthorDate: Tue, 30 Oct 2012 09:46:00 +0100
Committer:  Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate: Wed, 31 Oct 2012 12:17:49 -0200

perf tools: Speed up the perf build time by simplifying the perf --version string generation

Building perf is pretty slow on trees that have a lot of commits
relative to the nearest Git tag. This slowness manifests itself during
version string generation:

 $ perf stat --null --repeat 3 --sync --pre "rm -f PERF-VERSION-FILE" util/PERF-VERSION-GEN
 PERF_VERSION = 3.7.rc3.1458.g5399b3b
 PERF_VERSION = 3.7.rc3.1458.g5399b3b
 PERF_VERSION = 3.7.rc3.1458.g5399b3b

 Performance counter stats for 'util/PERF-VERSION-GEN' (3 runs):

       2.857503976 seconds time elapsed                                          ( +-  0.22% )

The build can be even slower than that, when one over NFS volumes.

The reason for the slowness is that util/PERF-VERSION-GEN uses "git
describe" to generate the string, which has to count the "number of
commits distance" from the nearest tag - the ".1458." count in the
output above. For that Git had to extract and decompress 1458 Git
objects, which takes time and bandwidth.

But this "number of commits" value is mostly irrelevant in practice. We
either want to know an approximate tag name, or we want to know the
precise sha1.

So this patch simplifies the version string to:

 PERF_VERSION = 3.7.rc3.g5399b3b.dirty

which speeds up the version string generation script by an order of
magnitude:

 $ perf stat --null --repeat 3 --sync --pre "rm -f PERF-VERSION-FILE" util/PERF-VERSION-GEN
 PERF_VERSION = 3.7.rc3.g5399b3b.dirty
 PERF_VERSION = 3.7.rc3.g5399b3b.dirty
 PERF_VERSION = 3.7.rc3.g5399b3b.dirty

 Performance counter stats for 'util/PERF-VERSION-GEN' (3 runs):

       0.307633559 seconds time elapsed                                          ( +-  0.84% )

Signed-off-by: Ingo Molnar <mi...@kernel.org>
Cc: Andrew Vagin <ava...@openvz.org>
Cc: Borislav Petkov <b...@amd64.org>
Cc: David Howells <dhowe...@redhat.com>
Cc: Frederic Weisbecker <fweis...@gmail.com>
Cc: Jiri Olsa <jo...@redhat.com>
Cc: Namhyung Kim <namhy...@kernel.org>
Cc: Paul Mackerras <pau...@samba.org>
Cc: Peter Zijlstra <a.p.zijls...@chello.nl>
Cc: Stephane Eranian <eran...@gmail.com>
Cc: Steven Rostedt <rost...@goodmis.org>
Link: http://lkml.kernel.org/r/20121030084600.GB8...@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com>
---
 tools/perf/util/PERF-VERSION-GEN |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN
index 95264f3..f6e8ee2 100755
--- a/tools/perf/util/PERF-VERSION-GEN
+++ b/tools/perf/util/PERF-VERSION-GEN
@@ -12,7 +12,7 @@ LF='
 # First check if there is a .git to get the version from git describe
 # otherwise try to get the version from the kernel makefile
 if test -d ../../.git -o -f ../../.git &&
-       VN=$(git describe --match 'v[0-9].[0-9]*' --abbrev=4 HEAD 2>/dev/null) &&
+       VN=$(echo $(git tag -l "v[0-9].[0-9]*" | tail -1)"-g"$(git log -1 --abbrev=4 --pretty=format:"%h" HEAD) 2>/dev/null) &&
        case "$VN" in
        *$LF*) (exit 1) ;;
        v[0-9]*)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "perf tools: Further speed up the perf build" by tip-bot for Ingo Molnar
tip-bot for Ingo Molnar  
View profile  
 More options Nov 14 2012, 1:34 am
Newsgroups: fa.linux.kernel
From: tip-bot for Ingo Molnar <mi...@kernel.org>
Date: Wed, 14 Nov 2012 06:34:00 UTC
Subject: [tip:perf/core] perf tools: Further speed up the perf build
Commit-ID:  0e2af956693a8797d658d076ff4c0da4147f0131
Gitweb:     http://git.kernel.org/tip/0e2af956693a8797d658d076ff4c0da4147f0131
Author:     Ingo Molnar <mi...@kernel.org>
AuthorDate: Tue, 30 Oct 2012 09:54:41 +0100
Committer:  Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate: Wed, 31 Oct 2012 12:17:49 -0200

perf tools: Further speed up the perf build

There's another source of overhead in the perf version string generator:

   git update-index -q --refresh

.. which will iterate the whole checked out tree. This can be pretty
slow on NFS volumes, but takes some time even with local SSD disks and a
fully cached kernel tree:

 $ perf stat --null --repeat 3 --pre "rm -f PERF-VERSION-FILE" util/PERF-VERSION-GEN
 PERF_VERSION = 3.7.rc3.g5399b3b.dirty
 PERF_VERSION = 3.7.rc3.g5399b3b.dirty
 PERF_VERSION = 3.7.rc3.g5399b3b.dirty

 Performance counter stats for 'util/PERF-VERSION-GEN' (3 runs):

       0.306999221 seconds time elapsed                                          ( +-  0.56% )

So remove the .dirty differentiator as well - it adds little information
because locally patched git trees are common, but seldom are the perf
tools modified.

So a lot of version strings are reported as 'dirty' while in fact they
are pristine perf builds. For example 99% of my perf builds are not
patched but the kernel tree is slightly patched, which adds the .dirty
tag.

Eliminating that tag speeds up version generation by another order of
magnitude:

 $ perf stat --null --repeat 3 --sync --pre "rm -f PERF-VERSION-FILE" util/PERF-VERSION-GEN
 PERF_VERSION = 3.7.rc3.g4b0bd3
 PERF_VERSION = 3.7.rc3.g4b0bd3
 PERF_VERSION = 3.7.rc3.g4b0bd3

 Performance counter stats for 'util/PERF-VERSION-GEN' (3 runs):

       0.021270923 seconds time elapsed                                          ( +-  1.94% )

(Also clean up some of the comments around this code.)

Signed-off-by: Ingo Molnar <mi...@kernel.org>
Cc: Andrew Vagin <ava...@openvz.org>
Cc: Borislav Petkov <b...@amd64.org>
Cc: David Howells <dhowe...@redhat.com>
Cc: Frederic Weisbecker <fweis...@gmail.com>
Cc: Jiri Olsa <jo...@redhat.com>
Cc: Namhyung Kim <namhy...@kernel.org>
Cc: Paul Mackerras <pau...@samba.org>
Cc: Peter Zijlstra <a.p.zijls...@chello.nl>
Cc: Stephane Eranian <eran...@gmail.com>
Cc: Steven Rostedt <rost...@goodmis.org>
Link: http://lkml.kernel.org/r/20121030085441.GC8...@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com>
---
 tools/perf/util/PERF-VERSION-GEN |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN
index f6e8ee2..ac418a1 100755
--- a/tools/perf/util/PERF-VERSION-GEN
+++ b/tools/perf/util/PERF-VERSION-GEN
@@ -9,17 +9,12 @@ GVF=${OUTPUT}PERF-VERSION-FILE
 LF='
 '

+#
 # First check if there is a .git to get the version from git describe
-# otherwise try to get the version from the kernel makefile
+# otherwise try to get the version from the kernel Makefile
+#
 if test -d ../../.git -o -f ../../.git &&
-       VN=$(echo $(git tag -l "v[0-9].[0-9]*" | tail -1)"-g"$(git log -1 --abbrev=4 --pretty=format:"%h" HEAD) 2>/dev/null) &&
-       case "$VN" in
-       *$LF*) (exit 1) ;;
-       v[0-9]*)
-               git update-index -q --refresh
-               test -z "$(git diff-index --name-only HEAD --)" ||
-               VN="$VN-dirty" ;;
-       esac
+       VN=$(echo $(git tag -l "v[0-9].[0-9]*" | tail -1)"-g"$(git log -1 --abbrev=4 --pretty=format:"%h" HEAD) 2>/dev/null)
 then
        VN=$(echo "$VN" | sed -e 's/-/./g');
 else
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages < Older 
« Back to Discussions « Newer topic     Older topic »