Uwe Kleine-König wrote:

> Most archs use the C-version of recordmcount nowadays. I don't know
> about 3.2, but for new versions we'd need a binary and rewrite
> Makefile.build IIRC.

The magic happens in the toplevel Makefile, which is not installed in
kbuild:

| ifdef CONFIG_FUNCTION_TRACER
| KBUILD_CFLAGS   += -pg
| ifdef CONFIG_DYNAMIC_FTRACE
|       ifdef CONFIG_HAVE_C_RECORDMCOUNT
|               BUILD_C_RECORDMCOUNT := y
|               export BUILD_C_RECORDMCOUNT
|       endif
| endif
| endif

In scripts/Makefile.build the behavior depends on the
BUILD_C_RECORDMOUNT setting.

| ifdef CONFIG_FTRACE_MCOUNT_RECORD
[...]
| cmd_record_mcount =                                           \
|       if [ "$(findstring -pg,$(_c_flags))" = "-pg" ]; then    \
|               $(sub_cmd_record_mcount)                        \
|       fi;
| endif

So the patch I sent might happen to work. Here's a presumably better
patch (still untested).

Index: debian/changelog
===================================================================
--- debian/changelog    (révision 19403)
+++ debian/changelog    (copie de travail)
@@ -1,9 +1,13 @@
 linux-tools (3.5-1~experimental.2) UNRELEASED; urgency=low
 
+  [ Ben Hutchings ]
   * genorig: Accept xz-compressed upstream tarballs and patches, and
     generate an xz-compressed orig tarball, thanks to Sedat Dilek
   * source: Enable xz-compression for debian directory tarball
 
+  [ Jonathan Nieder ]
+  * Include recordmcount and recordmcount.pl (Closes: #568165)
+
  -- Ben Hutchings <b...@decadent.org.uk>  Tue, 21 Aug 2012 05:05:42 +0100
 
 linux-tools (3.5-1~experimental.1) experimental; urgency=low
Index: debian/build/scripts/Makefile
===================================================================
--- debian/build/scripts/Makefile       (révision 19403)
+++ debian/build/scripts/Makefile       (copie de travail)
@@ -2,7 +2,8 @@
        bin2c \
        conmakehash \
        kallsyms \
-       pnmtologo
+       pnmtologo \
+       recordmcount
 
 DATA = \
        Kbuild.include \
@@ -32,6 +33,7 @@
        mkuboot.sh \
        namespace.pl \
        patch-kernel \
+       recordmcount.pl \
        setlocalversion \
        ver_linux
 


--
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20121001190254.GE16391@elie.Belkin

Reply via email to