diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-29 16:32:35 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-29 16:32:35 -0500 |
commit | 33edcf133ba93ecba2e4b6472e97b689895d805c (patch) | |
tree | 327d7a20acef64005e7c5ccbfa1265be28aeb6ac /init | |
parent | be4d638c1597580ed2294d899d9f1a2cd10e462c (diff) | |
parent | 3c92ec8ae91ecf59d88c798301833d7cf83f2179 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 8 | ||||
-rw-r--r-- | init/main.c | 36 |
2 files changed, 29 insertions, 15 deletions
diff --git a/init/Kconfig b/init/Kconfig index 7656623f5006..8e9904fc3024 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -588,6 +588,13 @@ config KALLSYMS_ALL | |||
588 | 588 | ||
589 | Say N. | 589 | Say N. |
590 | 590 | ||
591 | config KALLSYMS_STRIP_GENERATED | ||
592 | bool "Strip machine generated symbols from kallsyms" | ||
593 | depends on KALLSYMS_ALL | ||
594 | default y | ||
595 | help | ||
596 | Say N if you want kallsyms to retain even machine generated symbols. | ||
597 | |||
591 | config KALLSYMS_EXTRA_PASS | 598 | config KALLSYMS_EXTRA_PASS |
592 | bool "Do an extra kallsyms pass" | 599 | bool "Do an extra kallsyms pass" |
593 | depends on KALLSYMS | 600 | depends on KALLSYMS |
@@ -808,6 +815,7 @@ config TRACEPOINTS | |||
808 | 815 | ||
809 | config MARKERS | 816 | config MARKERS |
810 | bool "Activate markers" | 817 | bool "Activate markers" |
818 | depends on TRACEPOINTS | ||
811 | help | 819 | help |
812 | Place an empty function call at each marker site. Can be | 820 | Place an empty function call at each marker site. Can be |
813 | dynamically changed for a probe function. | 821 | dynamically changed for a probe function. |
diff --git a/init/main.c b/init/main.c index 7e117a231af1..17e9757bfde2 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -63,6 +63,7 @@ | |||
63 | #include <linux/signal.h> | 63 | #include <linux/signal.h> |
64 | #include <linux/idr.h> | 64 | #include <linux/idr.h> |
65 | #include <linux/ftrace.h> | 65 | #include <linux/ftrace.h> |
66 | #include <trace/boot.h> | ||
66 | 67 | ||
67 | #include <asm/io.h> | 68 | #include <asm/io.h> |
68 | #include <asm/bugs.h> | 69 | #include <asm/bugs.h> |
@@ -669,6 +670,7 @@ asmlinkage void __init start_kernel(void) | |||
669 | efi_enter_virtual_mode(); | 670 | efi_enter_virtual_mode(); |
670 | #endif | 671 | #endif |
671 | thread_info_cache_init(); | 672 | thread_info_cache_init(); |
673 | cred_init(); | ||
672 | fork_init(num_physpages); | 674 | fork_init(num_physpages); |
673 | proc_caches_init(); | 675 | proc_caches_init(); |
674 | buffer_init(); | 676 | buffer_init(); |
@@ -703,31 +705,35 @@ core_param(initcall_debug, initcall_debug, bool, 0644); | |||
703 | int do_one_initcall(initcall_t fn) | 705 | int do_one_initcall(initcall_t fn) |
704 | { | 706 | { |
705 | int count = preempt_count(); | 707 | int count = preempt_count(); |
706 | ktime_t delta; | 708 | ktime_t calltime, delta, rettime; |
707 | char msgbuf[64]; | 709 | char msgbuf[64]; |
708 | struct boot_trace it; | 710 | struct boot_trace_call call; |
711 | struct boot_trace_ret ret; | ||
709 | 712 | ||
710 | if (initcall_debug) { | 713 | if (initcall_debug) { |
711 | it.caller = task_pid_nr(current); | 714 | call.caller = task_pid_nr(current); |
712 | printk("calling %pF @ %i\n", fn, it.caller); | 715 | printk("calling %pF @ %i\n", fn, call.caller); |
713 | it.calltime = ktime_get(); | 716 | calltime = ktime_get(); |
717 | trace_boot_call(&call, fn); | ||
718 | enable_boot_trace(); | ||
714 | } | 719 | } |
715 | 720 | ||
716 | it.result = fn(); | 721 | ret.result = fn(); |
717 | 722 | ||
718 | if (initcall_debug) { | 723 | if (initcall_debug) { |
719 | it.rettime = ktime_get(); | 724 | disable_boot_trace(); |
720 | delta = ktime_sub(it.rettime, it.calltime); | 725 | rettime = ktime_get(); |
721 | it.duration = (unsigned long long) delta.tv64 >> 10; | 726 | delta = ktime_sub(rettime, calltime); |
727 | ret.duration = (unsigned long long) ktime_to_ns(delta) >> 10; | ||
728 | trace_boot_ret(&ret, fn); | ||
722 | printk("initcall %pF returned %d after %Ld usecs\n", fn, | 729 | printk("initcall %pF returned %d after %Ld usecs\n", fn, |
723 | it.result, it.duration); | 730 | ret.result, ret.duration); |
724 | trace_boot(&it, fn); | ||
725 | } | 731 | } |
726 | 732 | ||
727 | msgbuf[0] = 0; | 733 | msgbuf[0] = 0; |
728 | 734 | ||
729 | if (it.result && it.result != -ENODEV && initcall_debug) | 735 | if (ret.result && ret.result != -ENODEV && initcall_debug) |
730 | sprintf(msgbuf, "error code %d ", it.result); | 736 | sprintf(msgbuf, "error code %d ", ret.result); |
731 | 737 | ||
732 | if (preempt_count() != count) { | 738 | if (preempt_count() != count) { |
733 | strlcat(msgbuf, "preemption imbalance ", sizeof(msgbuf)); | 739 | strlcat(msgbuf, "preemption imbalance ", sizeof(msgbuf)); |
@@ -741,7 +747,7 @@ int do_one_initcall(initcall_t fn) | |||
741 | printk("initcall %pF returned with %s\n", fn, msgbuf); | 747 | printk("initcall %pF returned with %s\n", fn, msgbuf); |
742 | } | 748 | } |
743 | 749 | ||
744 | return it.result; | 750 | return ret.result; |
745 | } | 751 | } |
746 | 752 | ||
747 | 753 | ||
@@ -882,7 +888,7 @@ static int __init kernel_init(void * unused) | |||
882 | * we're essentially up and running. Get rid of the | 888 | * we're essentially up and running. Get rid of the |
883 | * initmem segments and start the user-mode stuff.. | 889 | * initmem segments and start the user-mode stuff.. |
884 | */ | 890 | */ |
885 | stop_boot_trace(); | 891 | |
886 | init_post(); | 892 | init_post(); |
887 | return 0; | 893 | return 0; |
888 | } | 894 | } |