Patches contributed by Eötvös Lorand University
commit 91fd7fe809bdf4d8aa56559d17b9f25a1a6fe732
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Apr 29 10:58:38 2009 +0200
x86, vmlinux.lds: add copyright
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tim Abbott <tabbott@MIT.EDU>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <1240991249-27117-2-git-send-email-sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index ef3e4f1042b5..0bdbaa579696 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -3,7 +3,8 @@
*
* Historic 32-bit version written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
*
- * Modernisation and unification done by Sam Ravnborg <sam@ravnborg.org>
+ * Modernisation, unification and other changes and fixes:
+ * Copyright (C) 2007-2009 Sam Ravnborg <sam@ravnborg.org>
*
*
* Don't define absolute symbols until and unless you know that symbol
commit 148be2c15d4a866fbc7a8f55342e4fd4de73be61
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Apr 27 08:02:14 2009 +0200
perf_counter tools: move helper library to util/*
Clean up the top level directory a bit by moving all the helper libraries
to util/*.[ch].
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/Documentation/perf_counter/Makefile b/Documentation/perf_counter/Makefile
index 690045e49692..543ccf28ac4a 100644
--- a/Documentation/perf_counter/Makefile
+++ b/Documentation/perf_counter/Makefile
@@ -147,7 +147,7 @@ all::
# broken, or spawning external process is slower than built-in grep perf has).
PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
- @$(SHELL_PATH) ./PERF-VERSION-GEN
+ @$(SHELL_PATH) util/PERF-VERSION-GEN
-include PERF-VERSION-FILE
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
@@ -287,26 +287,28 @@ export PERL_PATH
LIB_FILE=libperf.a
LIB_H += ../../include/linux/perf_counter.h
-LIB_H += levenshtein.h
-LIB_H += parse-options.h
-LIB_H += quote.h
-LIB_H += strbuf.h
-LIB_H += run-command.h
-
-LIB_OBJS += abspath.o
-LIB_OBJS += alias.o
-LIB_OBJS += config.o
-LIB_OBJS += ctype.o
-LIB_OBJS += exec_cmd.o
-LIB_OBJS += help.o
-LIB_OBJS += levenshtein.o
-LIB_OBJS += parse-options.o
-LIB_OBJS += path.o
-LIB_OBJS += run-command.o
-LIB_OBJS += quote.o
-LIB_OBJS += strbuf.o
-LIB_OBJS += usage.o
-LIB_OBJS += wrapper.o
+LIB_H += util/levenshtein.h
+LIB_H += util/parse-options.h
+LIB_H += util/quote.h
+LIB_H += util/util.h
+LIB_H += util/help.h
+LIB_H += util/strbuf.h
+LIB_H += util/run-command.h
+
+LIB_OBJS += util/abspath.o
+LIB_OBJS += util/alias.o
+LIB_OBJS += util/config.o
+LIB_OBJS += util/ctype.o
+LIB_OBJS += util/exec_cmd.o
+LIB_OBJS += util/help.o
+LIB_OBJS += util/levenshtein.o
+LIB_OBJS += util/parse-options.o
+LIB_OBJS += util/path.o
+LIB_OBJS += util/run-command.o
+LIB_OBJS += util/quote.o
+LIB_OBJS += util/strbuf.o
+LIB_OBJS += util/usage.o
+LIB_OBJS += util/wrapper.o
BUILTIN_OBJS += builtin-help.o
BUILTIN_OBJS += builtin-record.o
@@ -620,10 +622,10 @@ $(BUILT_INS): perf$X
ln -s perf$X $@ 2>/dev/null || \
cp perf$X $@
-common-cmds.h: ./generate-cmdlist.sh command-list.txt
+common-cmds.h: util/generate-cmdlist.sh command-list.txt
common-cmds.h: $(wildcard Documentation/perf-*.txt)
- $(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@
+ $(QUIET_GEN)util/generate-cmdlist.sh > $@+ && mv $@+ $@
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
$(QUIET_GEN)$(RM) $@ $@+ && \
@@ -656,7 +658,7 @@ perf.o perf.spec \
%.o: %.S
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
-exec_cmd.o: exec_cmd.c PERF-CFLAGS
+util/exec_cmd.o: util/exec_cmd.c PERF-CFLAGS
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \
'-DPERF_EXEC_PATH="$(perfexecdir_SQ)"' \
'-DBINDIR="$(bindir_relative_SQ)"' \
@@ -666,7 +668,7 @@ exec_cmd.o: exec_cmd.c PERF-CFLAGS
builtin-init-db.o: builtin-init-db.c PERF-CFLAGS
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DDEFAULT_PERF_TEMPLATE_DIR='"$(template_dir_SQ)"' $<
-config.o: config.c PERF-CFLAGS
+util/config.o: util/config.c PERF-CFLAGS
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $<
perf-%$X: %.o $(PERFLIBS)
@@ -729,7 +731,7 @@ export NO_SVN_TESTS
check: common-cmds.h
if sparse; \
then \
- for i in *.c; \
+ for i in *.c */*.c; \
do \
sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; \
done; \
@@ -795,7 +797,7 @@ distclean: clean
$(RM) configure
clean:
- $(RM) *.o $(LIB_FILE)
+ $(RM) *.o */*.o $(LIB_FILE)
$(RM) $(ALL_PROGRAMS) $(BUILT_INS) perf$X
$(RM) $(TEST_PROGRAMS)
$(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*
@@ -836,7 +838,7 @@ coverage-build: coverage-clean
-j1 test
coverage-report:
- gcov -b *.c
- grep '^function.*called 0 ' *.c.gcov \
+ gcov -b *.c */*.c
+ grep '^function.*called 0 ' *.c.gcov */*.c.gcov \
| sed -e 's/\([^:]*\)\.gcov: *function \([^ ]*\) called.*/\1: \2/' \
| tee coverage-untested-functions
diff --git a/Documentation/perf_counter/builtin-help.c b/Documentation/perf_counter/builtin-help.c
index a136d619db37..6616de0ef053 100644
--- a/Documentation/perf_counter/builtin-help.c
+++ b/Documentation/perf_counter/builtin-help.c
@@ -3,13 +3,13 @@
*
* Builtin help command
*/
-#include "cache.h"
+#include "util/cache.h"
#include "builtin.h"
-#include "exec_cmd.h"
+#include "util/exec_cmd.h"
#include "common-cmds.h"
-#include "parse-options.h"
-#include "run-command.h"
-#include "help.h"
+#include "util/parse-options.h"
+#include "util/run-command.h"
+#include "util/help.h"
static struct man_viewer_list {
struct man_viewer_list *next;
diff --git a/Documentation/perf_counter/builtin-stat.c b/Documentation/perf_counter/builtin-stat.c
index 169a2d1783fc..d7ace631fc4f 100644
--- a/Documentation/perf_counter/builtin-stat.c
+++ b/Documentation/perf_counter/builtin-stat.c
@@ -61,7 +61,7 @@
* Released under the GPL v2. (and only v2, not any later version)
*/
-#include "util.h"
+#include "util/util.h"
#include <getopt.h>
#include <assert.h>
diff --git a/Documentation/perf_counter/builtin-top.c b/Documentation/perf_counter/builtin-top.c
index 98e8690b6bcb..dea016fa41e8 100644
--- a/Documentation/perf_counter/builtin-top.c
+++ b/Documentation/perf_counter/builtin-top.c
@@ -42,7 +42,7 @@
* Released under the GPL v2. (and only v2, not any later version)
*/
-#include "util.h"
+#include "util/util.h"
#include <getopt.h>
#include <assert.h>
diff --git a/Documentation/perf_counter/builtin.h b/Documentation/perf_counter/builtin.h
index 800f86c1d445..d32318aed8cf 100644
--- a/Documentation/perf_counter/builtin.h
+++ b/Documentation/perf_counter/builtin.h
@@ -1,8 +1,8 @@
#ifndef BUILTIN_H
#define BUILTIN_H
-#include "util.h"
-#include "strbuf.h"
+#include "util/util.h"
+#include "util/strbuf.h"
extern const char perf_version_string[];
extern const char perf_usage_string[];
diff --git a/Documentation/perf_counter/perf.c b/Documentation/perf_counter/perf.c
index 8d6faecdc15d..594d270be390 100644
--- a/Documentation/perf_counter/perf.c
+++ b/Documentation/perf_counter/perf.c
@@ -1,8 +1,8 @@
#include "builtin.h"
-#include "exec_cmd.h"
-#include "cache.h"
-#include "quote.h"
-#include "run-command.h"
+#include "util/exec_cmd.h"
+#include "util/cache.h"
+#include "util/quote.h"
+#include "util/run-command.h"
const char perf_usage_string[] =
"perf [--version] [--help] COMMAND [ARGS]";
diff --git a/Documentation/perf_counter/PERF-VERSION-GEN b/Documentation/perf_counter/util/PERF-VERSION-GEN
similarity index 100%
rename from Documentation/perf_counter/PERF-VERSION-GEN
rename to Documentation/perf_counter/util/PERF-VERSION-GEN
diff --git a/Documentation/perf_counter/abspath.c b/Documentation/perf_counter/util/abspath.c
similarity index 100%
rename from Documentation/perf_counter/abspath.c
rename to Documentation/perf_counter/util/abspath.c
diff --git a/Documentation/perf_counter/alias.c b/Documentation/perf_counter/util/alias.c
similarity index 100%
rename from Documentation/perf_counter/alias.c
rename to Documentation/perf_counter/util/alias.c
diff --git a/Documentation/perf_counter/cache.h b/Documentation/perf_counter/util/cache.h
similarity index 100%
rename from Documentation/perf_counter/cache.h
rename to Documentation/perf_counter/util/cache.h
diff --git a/Documentation/perf_counter/config.c b/Documentation/perf_counter/util/config.c
similarity index 100%
rename from Documentation/perf_counter/config.c
rename to Documentation/perf_counter/util/config.c
diff --git a/Documentation/perf_counter/ctype.c b/Documentation/perf_counter/util/ctype.c
similarity index 100%
rename from Documentation/perf_counter/ctype.c
rename to Documentation/perf_counter/util/ctype.c
diff --git a/Documentation/perf_counter/exec_cmd.c b/Documentation/perf_counter/util/exec_cmd.c
similarity index 100%
rename from Documentation/perf_counter/exec_cmd.c
rename to Documentation/perf_counter/util/exec_cmd.c
diff --git a/Documentation/perf_counter/exec_cmd.h b/Documentation/perf_counter/util/exec_cmd.h
similarity index 100%
rename from Documentation/perf_counter/exec_cmd.h
rename to Documentation/perf_counter/util/exec_cmd.h
diff --git a/Documentation/perf_counter/generate-cmdlist.sh b/Documentation/perf_counter/util/generate-cmdlist.sh
similarity index 100%
rename from Documentation/perf_counter/generate-cmdlist.sh
rename to Documentation/perf_counter/util/generate-cmdlist.sh
diff --git a/Documentation/perf_counter/help.c b/Documentation/perf_counter/util/help.c
similarity index 99%
rename from Documentation/perf_counter/help.c
rename to Documentation/perf_counter/util/help.c
index ec0116721660..edde541d238d 100644
--- a/Documentation/perf_counter/help.c
+++ b/Documentation/perf_counter/util/help.c
@@ -1,5 +1,5 @@
#include "cache.h"
-#include "builtin.h"
+#include "../builtin.h"
#include "exec_cmd.h"
#include "levenshtein.h"
#include "help.h"
diff --git a/Documentation/perf_counter/help.h b/Documentation/perf_counter/util/help.h
similarity index 100%
rename from Documentation/perf_counter/help.h
rename to Documentation/perf_counter/util/help.h
diff --git a/Documentation/perf_counter/levenshtein.c b/Documentation/perf_counter/util/levenshtein.c
similarity index 100%
rename from Documentation/perf_counter/levenshtein.c
rename to Documentation/perf_counter/util/levenshtein.c
diff --git a/Documentation/perf_counter/levenshtein.h b/Documentation/perf_counter/util/levenshtein.h
similarity index 100%
rename from Documentation/perf_counter/levenshtein.h
rename to Documentation/perf_counter/util/levenshtein.h
diff --git a/Documentation/perf_counter/parse-options.c b/Documentation/perf_counter/util/parse-options.c
similarity index 99%
rename from Documentation/perf_counter/parse-options.c
rename to Documentation/perf_counter/util/parse-options.c
index 7464f34e5407..28b34c1c29cf 100644
--- a/Documentation/perf_counter/parse-options.c
+++ b/Documentation/perf_counter/util/parse-options.c
@@ -469,9 +469,6 @@ int parse_options_usage(const char * const *usagestr,
}
-/*----- some often used options -----*/
-#include "cache.h"
-
int parse_opt_verbosity_cb(const struct option *opt, const char *arg,
int unset)
{
diff --git a/Documentation/perf_counter/parse-options.h b/Documentation/perf_counter/util/parse-options.h
similarity index 100%
rename from Documentation/perf_counter/parse-options.h
rename to Documentation/perf_counter/util/parse-options.h
diff --git a/Documentation/perf_counter/path.c b/Documentation/perf_counter/util/path.c
similarity index 100%
rename from Documentation/perf_counter/path.c
rename to Documentation/perf_counter/util/path.c
diff --git a/Documentation/perf_counter/quote.c b/Documentation/perf_counter/util/quote.c
similarity index 100%
rename from Documentation/perf_counter/quote.c
rename to Documentation/perf_counter/util/quote.c
diff --git a/Documentation/perf_counter/quote.h b/Documentation/perf_counter/util/quote.h
similarity index 97%
rename from Documentation/perf_counter/quote.h
rename to Documentation/perf_counter/util/quote.h
index 66730f2bff3c..5dfad89816db 100644
--- a/Documentation/perf_counter/quote.h
+++ b/Documentation/perf_counter/util/quote.h
@@ -18,7 +18,7 @@
* run the command on the other side:
*
* sprintf(cmd, "git-diff-tree %s %s", sq_quote(arg0), sq_quote(arg1));
- * sprintf(rcmd, "ssh %s %s", sq_quote(host), sq_quote(cmd));
+ * sprintf(rcmd, "ssh %s %s", sq_util/quote.host), sq_quote(cmd));
*
* Note that the above examples leak memory! Remember to free result from
* sq_quote() in a real application.
diff --git a/Documentation/perf_counter/run-command.c b/Documentation/perf_counter/util/run-command.c
similarity index 100%
rename from Documentation/perf_counter/run-command.c
rename to Documentation/perf_counter/util/run-command.c
diff --git a/Documentation/perf_counter/run-command.h b/Documentation/perf_counter/util/run-command.h
similarity index 100%
rename from Documentation/perf_counter/run-command.h
rename to Documentation/perf_counter/util/run-command.h
diff --git a/Documentation/perf_counter/strbuf.c b/Documentation/perf_counter/util/strbuf.c
similarity index 100%
rename from Documentation/perf_counter/strbuf.c
rename to Documentation/perf_counter/util/strbuf.c
diff --git a/Documentation/perf_counter/strbuf.h b/Documentation/perf_counter/util/strbuf.h
similarity index 100%
rename from Documentation/perf_counter/strbuf.h
rename to Documentation/perf_counter/util/strbuf.h
diff --git a/Documentation/perf_counter/usage.c b/Documentation/perf_counter/util/usage.c
similarity index 100%
rename from Documentation/perf_counter/usage.c
rename to Documentation/perf_counter/util/usage.c
diff --git a/Documentation/perf_counter/util.h b/Documentation/perf_counter/util/util.h
similarity index 100%
rename from Documentation/perf_counter/util.h
rename to Documentation/perf_counter/util/util.h
diff --git a/Documentation/perf_counter/wrapper.c b/Documentation/perf_counter/util/wrapper.c
similarity index 100%
rename from Documentation/perf_counter/wrapper.c
rename to Documentation/perf_counter/util/wrapper.c
commit 416dfdcdb894432547ead4fcb9fa6a36b396059e
Merge: 56449f437add 091069740304
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Apr 24 10:11:18 2009 +0200
Merge commit 'v2.6.30-rc3' into tracing/hw-branch-tracing
Conflicts:
arch/x86/kernel/ptrace.c
Merge reason: fix the conflict above, and also pick up the CONFIG_BROKEN
dependency change from upstream so that we can remove it
here.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --cc arch/x86/kernel/ptrace.c
index b32a8ee53381,23b7c8f017e2..d5252ae6c520
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@@ -21,8 -21,6 +21,7 @@@
#include <linux/audit.h>
#include <linux/seccomp.h>
#include <linux/signal.h>
- #include <linux/ftrace.h>
+#include <linux/workqueue.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
diff --cc kernel/ptrace.c
index 321127d965c2,dfcd83ceee3b..4559e84f4b8a
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@@ -21,11 -21,19 +21,9 @@@
#include <linux/audit.h>
#include <linux/pid_namespace.h>
#include <linux/syscalls.h>
-
- #include <asm/pgtable.h>
- #include <asm/uaccess.h>
+ #include <linux/uaccess.h>
-/*
- * Initialize a new task whose father had been ptraced.
- *
- * Called from copy_process().
- */
-void ptrace_fork(struct task_struct *child, unsigned long clone_flags)
-{
- arch_ptrace_fork(child, clone_flags);
-}
-
/*
* ptrace a task: make the debugger its new parent and
* move it to the ptrace list.
commit b48ccb095a0c9257241261ec2bd1cbb1bdabc48b
Author: Ingo Molnar <mingo@elte.hu>
Date: Thu Apr 23 09:36:52 2009 +0200
locking: clarify kernel-taint warning message
Andi Kleen reported this message triggering on non-lockdep kernels:
Disabling lockdep due to kernel taint
Clarify the message to say 'lock debugging' - debug_locks_off()
turns off all things lock debugging, not just lockdep.
[ Impact: change kernel warning message text ]
Reported-by: Andi Kleen <andi@firstfloor.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/kernel/panic.c b/kernel/panic.c
index 934fb377f4b3..3dcaa1661357 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -221,7 +221,7 @@ void add_taint(unsigned flag)
* post-warning case.
*/
if (flag != TAINT_CRAP && flag != TAINT_WARN && __debug_locks_off())
- printk(KERN_WARNING "Disabling lockdep due to kernel taint\n");
+ printk(KERN_WARNING "Disabling lock debugging due to kernel taint\n");
set_bit(flag, &tainted_mask);
}
commit 3568b71d46bea87da1936902b6fbb2a3b1154b3d
Merge: 2a3313f494c2 091069740304
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Apr 22 12:44:16 2009 +0200
Merge commit 'v2.6.30-rc3' into x86/urgent
Merge reason: hpet.c changed upstream, make sure we test against that
Signed-off-by: Ingo Molnar <mingo@elte.hu>
commit 8ecee4620e76aae418bfa0e8cc830e92cb559bbb
Merge: 6424fb38667f a939b96cccdb
Author: Ingo Molnar <mingo@elte.hu>
Date: Tue Apr 21 10:46:39 2009 +0200
Merge branch 'linus' into x86/mm
Merge reason: refresh the topic: there's been 290 non-merges commits upstream
to arch/x86 alone.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
commit f1f9b3b1795da8625e0e6096813c9d18d4a344ce
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Apr 20 20:38:21 2009 +0200
perfcounters, sched: remove __task_delta_exec()
This function was left orphan by the latest round of sw-counter
cleanups.
[ Impact: remove unused kernel function ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index 080d1fd461d7..a77c6007dc99 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -85,7 +85,6 @@ static inline unsigned int kstat_irqs(unsigned int irq)
/*
* Lock/unlock the current runqueue - to extract task statistics:
*/
-extern unsigned long long __task_delta_exec(struct task_struct *tsk, int update);
extern unsigned long long task_delta_exec(struct task_struct *);
extern void account_user_time(struct task_struct *, cputime_t, cputime_t);
diff --git a/kernel/sched.c b/kernel/sched.c
index b66a08c2480e..a69278eef425 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4546,29 +4546,6 @@ DEFINE_PER_CPU(struct kernel_stat, kstat);
EXPORT_PER_CPU_SYMBOL(kstat);
-/*
- * Return any ns on the sched_clock that have not yet been banked in
- * @p in case that task is currently running.
- */
-unsigned long long __task_delta_exec(struct task_struct *p, int update)
-{
- s64 delta_exec;
- struct rq *rq;
-
- rq = task_rq(p);
- WARN_ON_ONCE(!runqueue_is_locked());
- WARN_ON_ONCE(!task_current(rq, p));
-
- if (update)
- update_rq_clock(rq);
-
- delta_exec = rq->clock - p->se.exec_start;
-
- WARN_ON_ONCE(delta_exec < 0);
-
- return delta_exec;
-}
-
/*
* Return any ns on the sched_clock that have not yet been banked in
* @p in case that task is currently running.
commit 62d170290979e0bb805d969cca4ea852bdd45260
Merge: 8b5b94e4e981 d91dfbb41bb2
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Apr 20 18:08:07 2009 +0200
Merge branch 'linus' into x86/urgent
Merge reason: We need the x86/uv updates from upstream, to queue up
dependent fix.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
commit 125e702b09a28a502e145fb434678ee27720fc48
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Apr 20 16:13:46 2009 +0200
perf_counter tools: fix 'make install'
Remove Git leftovers from this area.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/Documentation/perf_counter/Makefile b/Documentation/perf_counter/Makefile
index b6c665eb22e4..690045e49692 100644
--- a/Documentation/perf_counter/Makefile
+++ b/Documentation/perf_counter/Makefile
@@ -255,9 +255,9 @@ EXTRA_PROGRAMS =
PROGRAMS += $(EXTRA_PROGRAMS)
#
-# None right now:
+# Single 'perf' binary right now:
#
-# PROGRAMS += perf-fast-import$X
+PROGRAMS += perf
# List built-in command $C whose implementation cmd_$C() is not in
# builtin-$C.o but is linked in as part of some other command.
@@ -762,24 +762,9 @@ install: all
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
- $(INSTALL) perf$X perf-upload-pack$X perf-receive-pack$X perf-upload-archive$X perf-shell$X perf-cvsserver '$(DESTDIR_SQ)$(bindir_SQ)'
- $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
- $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
ifneq (,$X)
$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) perf$X)), $(RM) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/$p';)
endif
- bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
- execdir=$$(cd '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' && pwd) && \
- { $(RM) "$$execdir/perf-add$X" && \
- ln "$$bindir/perf$X" "$$execdir/perf-add$X" 2>/dev/null || \
- cp "$$bindir/perf$X" "$$execdir/perf-add$X"; } && \
- { for p in $(filter-out perf-add$X,$(BUILT_INS)); do \
- $(RM) "$$execdir/$$p" && \
- ln "$$execdir/perf-add$X" "$$execdir/$$p" 2>/dev/null || \
- ln -s "perf-add$X" "$$execdir/$$p" 2>/dev/null || \
- cp "$$execdir/perf-add$X" "$$execdir/$$p" || exit; \
- done } && \
- ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/perf-add$X"
### Maintainer's dist rules
commit 6142fdd968c76a0f2ee753c39bd5be8d1bb4ef04
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Apr 20 16:05:55 2009 +0200
perf_counter tools: add 'perf help'
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/Documentation/perf_counter/Documentation/perf-help.txt b/Documentation/perf_counter/Documentation/perf-help.txt
new file mode 100644
index 000000000000..f85fed5a7edb
--- /dev/null
+++ b/Documentation/perf_counter/Documentation/perf-help.txt
@@ -0,0 +1,38 @@
+perf-help(1)
+===========
+
+NAME
+----
+perf-help - display help information about perf
+
+SYNOPSIS
+--------
+'perf help' [-a|--all] [COMMAND]
+
+DESCRIPTION
+-----------
+
+With no options and no COMMAND given, the synopsis of the 'perf'
+command and a list of the most commonly used perf commands are printed
+on the standard output.
+
+If the option '--all' or '-a' is given, then all available commands are
+printed on the standard output.
+
+If a perf command is named, a manual page for that command is brought
+up. The 'man' program is used by default for this purpose, but this
+can be overridden by other options or configuration variables.
+
+Note that `perf --help ...` is identical to `perf help ...` because the
+former is internally converted into the latter.
+
+OPTIONS
+-------
+-a::
+--all::
+ Prints all the available commands on the standard output. This
+ option supersedes any other option.
+
+PERF
+----
+Part of the linkperf:perf[1] suite
diff --git a/Documentation/perf_counter/builtin.h b/Documentation/perf_counter/builtin.h
index aec5ae388e66..800f86c1d445 100644
--- a/Documentation/perf_counter/builtin.h
+++ b/Documentation/perf_counter/builtin.h
@@ -14,6 +14,7 @@ extern void prune_packed_objects(int);
extern int read_line_with_nul(char *buf, int size, FILE *file);
extern int check_pager_config(const char *cmd);
+extern int cmd_help(int argc, const char **argv, const char *prefix);
extern int cmd_record(int argc, const char **argv, const char *prefix);
extern int cmd_stat(int argc, const char **argv, const char *prefix);
extern int cmd_top(int argc, const char **argv, const char *prefix);
diff --git a/Documentation/perf_counter/perf.c b/Documentation/perf_counter/perf.c
index 20d508c77293..8d6faecdc15d 100644
--- a/Documentation/perf_counter/perf.c
+++ b/Documentation/perf_counter/perf.c
@@ -248,6 +248,7 @@ static void handle_internal_command(int argc, const char **argv)
{
const char *cmd = argv[0];
static struct cmd_struct commands[] = {
+ { "help", cmd_help, 0 },
{ "record", cmd_record, 0 },
{ "stat", cmd_stat, 0 },
{ "top", cmd_top, 0 },