summaryrefslogtreecommitdiffstats
path: root/qemu/roms/ipxe/src/include/ipxe/profile.h
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/roms/ipxe/src/include/ipxe/profile.h')
-rw-r--r--qemu/roms/ipxe/src/include/ipxe/profile.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/qemu/roms/ipxe/src/include/ipxe/profile.h b/qemu/roms/ipxe/src/include/ipxe/profile.h
index 3a745fcfa..b6d2b19e0 100644
--- a/qemu/roms/ipxe/src/include/ipxe/profile.h
+++ b/qemu/roms/ipxe/src/include/ipxe/profile.h
@@ -7,7 +7,7 @@
*
*/
-FILE_LICENCE ( GPL2_OR_LATER );
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <bits/profile.h>
#include <ipxe/tables.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 */