mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
drivers: qcom: Add support for kernel boot markers
The existing boot_stats module captures the timestamps of various events before the kernel start, like bootloader start, kernel load time, etc. Extend support to capture timestamps of events after kernel starts execution. Users can call place_marker from different points of execution to capture the timestamp. Expose a sysfs node to read the complete list of events captured by the boot_stats module. Change-Id: Icbc2341b34fe7e2559a37c092a5ab74919703184 Signed-off-by: Shreyas K K <[email protected]>
This commit is contained in:
parent
5b540967b7
commit
a7785a897c
3 changed files with 292 additions and 5 deletions
15
include/soc/qcom/boot_stats.h
Normal file
15
include/soc/qcom/boot_stats.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only
|
||||
* Copyright (c) 2011-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_MSM_BOOT_TIME_MARKER
|
||||
void place_marker(const char *name);
|
||||
void destroy_marker(const char *name);
|
||||
int boot_marker_enabled(void) { return 1; }
|
||||
#else
|
||||
static int init_bootkpi(void) { return 0; }
|
||||
static inline void exit_bootkpi(void) { };
|
||||
static inline void place_marker(char *name) { };
|
||||
static inline void destroy_marker(const char *name) { };
|
||||
static int boot_marker_enabled(void) { return 0; }
|
||||
#endif
|
||||
Loading…
Reference in a new issue