Skip to content

Commit

Permalink
tools/perf/build: Fix timerfd feature check
Browse files Browse the repository at this point in the history
'feature_timerfd' is checked all the time and calculated explicitly,
in a serial fashion. Add it to CORE_FEATURE_TESTS which causes it to
be built in parallel, using the newfangled parallel build autodetection
code.

This shaves 137 msecs off the perf build time on my system, which
speeds up the common case cached build by 43%:

Before:

  comet:~/tip> perf stat --null --repeat 5 make -C tools/perf/
  [...]
         0,453771441 seconds time elapsed                                          ( +-  0,09% )

After:

  comet:~/tip> perf stat --null --repeat 5 make -C tools/perf/
  [...]
         0,316290185 seconds time elapsed                                          ( +-  0,24% )

Cc: David Ahern <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Ingo Molnar committed Nov 14, 2013
1 parent 555a098 commit bb4c550
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/perf/config/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ CORE_FEATURE_TESTS = \
libunwind \
on-exit \
stackprotector \
stackprotector-all
stackprotector-all \
timerfd

#
# So here we detect whether test-all was rebuilt, to be able
Expand Down Expand Up @@ -405,7 +406,6 @@ else
endif
endif

$(call feature_check,timerfd)
ifeq ($(feature-timerfd), 1)
CFLAGS += -DHAVE_TIMERFD_SUPPORT
else
Expand Down

0 comments on commit bb4c550

Please sign in to comment.