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:
Shreyas K K 2021-02-12 20:57:58 +05:30 • committed by Gerrit - the friendly Code Review server
commit a7785a897c
3 changed files with 292 additions and 5 deletions

View 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