mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-28 12:34:26 +01:00
rename init_dev_kmsg to time_boot and move doc to README
This commit is contained in:
18
README.adoc
18
README.adoc
@@ -2363,6 +2363,24 @@ Source: link:kernel_module/user/sleep_forever.c[]
|
|||||||
|
|
||||||
This executable is a convenient simple init that does not panic and sleeps instead.
|
This executable is a convenient simple init that does not panic and sleeps instead.
|
||||||
|
|
||||||
|
==== time_boot.out
|
||||||
|
|
||||||
|
Get a reasonable answer to "how long does boot take?":
|
||||||
|
|
||||||
|
....
|
||||||
|
./run -F '/time_boot.out'
|
||||||
|
....
|
||||||
|
|
||||||
|
Dmesg contains a message of type:
|
||||||
|
|
||||||
|
....
|
||||||
|
[ 2.188242] time_boot.c
|
||||||
|
....
|
||||||
|
|
||||||
|
which tells us that boot took `2.188242` seconds.
|
||||||
|
|
||||||
|
Bibliography: https://stackoverflow.com/questions/12683169/measure-time-taken-for-linux-kernel-from-bootup-to-userpace/46517014#46517014
|
||||||
|
|
||||||
[[init-busybox]]
|
[[init-busybox]]
|
||||||
=== Run command at the end of BusyBox init
|
=== Run command at the end of BusyBox init
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* https://stackoverflow.com/questions/12683169/measure-time-taken-for-linux-kernel-from-bootup-to-userpace/46517014#46517014 */
|
/* https://github.com/cirosantilli/linux-kernel-module-cheat#time_boot-out */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
Reference in New Issue
Block a user