aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/ipxe/profile.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/ipxe/profile.h b/src/include/ipxe/profile.h
index 5d3b662..b6d2b19 100644
--- a/src/include/ipxe/profile.h
+++ b/src/include/ipxe/profile.h
@@ -186,4 +186,18 @@ profile_exclude ( struct profiler *profiler ) {
profile_excluded += profile_elapsed ( profiler );
}
+/**
+ * Record profiling sample in custom units
+ *
+ * @v profiler Profiler
+ * @v sample Profiling sample
+ */
+static inline __attribute__ (( always_inline )) void
+profile_custom ( struct profiler *profiler, unsigned long sample ) {
+
+ /* If profiling is active then update stats */
+ if ( PROFILING )
+ profile_update ( profiler, sample );
+}
+
#endif /* _IPXE_PROFILE_H */