|
@@ -266,6 +266,19 @@ ulong bootstage_error(enum bootstage_id id);
|
|
|
|
|
|
ulong bootstage_mark_name(enum bootstage_id id, const char *name);
|
|
ulong bootstage_mark_name(enum bootstage_id id, const char *name);
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * Mark a time stamp in the given function and line number
|
|
|
|
+ *
|
|
|
|
+ * See BOOTSTAGE_MARKER() for a convenient macro.
|
|
|
|
+ *
|
|
|
|
+ * @param file Filename to record (NULL if none)
|
|
|
|
+ * @param func Function name to record
|
|
|
|
+ * @param linenum Line number to record
|
|
|
|
+ * @return recorded time stamp
|
|
|
|
+ */
|
|
|
|
+ulong bootstage_mark_code(const char *file, const char *func,
|
|
|
|
+ int linenum);
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Mark the start of a bootstage activity. The end will be marked later with
|
|
* Mark the start of a bootstage activity. The end will be marked later with
|
|
* bootstage_accum() and at that point we accumulate the time taken. Calling
|
|
* bootstage_accum() and at that point we accumulate the time taken. Calling
|
|
@@ -358,6 +371,12 @@ static inline ulong bootstage_mark_name(enum bootstage_id id, const char *name)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline ulong bootstage_mark_code(const char *file, const char *func,
|
|
|
|
+ int linenum)
|
|
|
|
+{
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
static inline uint32_t bootstage_start(enum bootstage_id id, const char *name)
|
|
static inline uint32_t bootstage_start(enum bootstage_id id, const char *name)
|
|
{
|
|
{
|
|
return 0;
|
|
return 0;
|
|
@@ -379,4 +398,8 @@ static inline int bootstage_unstash(void *base, int size)
|
|
}
|
|
}
|
|
#endif /* CONFIG_BOOTSTAGE */
|
|
#endif /* CONFIG_BOOTSTAGE */
|
|
|
|
|
|
|
|
+/* Helper macro for adding a bootstage to a line of code */
|
|
|
|
+#define BOOTSTAGE_MARKER() \
|
|
|
|
+ bootstage_mark_code(__FILE__, __func__, __LINE__)
|
|
|
|
+
|
|
#endif
|
|
#endif
|