These changes are the raw update to qemu-2.6.
[kvmfornfv.git] / qemu / roms / ipxe / src / include / ipxe / profile.h
index 3a745fc..b6d2b19 100644 (file)
@@ -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 */