]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes in shared code that don't affect open-vm-tools functionality.
authorVMware, Inc <>
Mon, 15 Oct 2012 04:50:40 +0000 (21:50 -0700)
committerDmitry Torokhov <dtor@vmware.com>
Fri, 19 Oct 2012 18:32:40 +0000 (11:32 -0700)
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/lib/include/vm_basic_types.h

index c50d267cfc172401747f4441a7b0e14423937a01..9c637229e9d473694cc5704301237a2f9f263773 100644 (file)
@@ -726,6 +726,21 @@ typedef void * UserVA;
 #define NORETURN
 #endif
 
+/*
+ * Static profiling hints for functions.
+ *    A function can be either hot, cold, or neither.
+ *    It is an error to specify both hot and cold for the same function.
+ *    Note that there is no annotation for "neither."
+ */
+
+#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
+#define HOT __attribute__((hot))
+#define COLD __attribute__((cold))
+#else
+#define HOT
+#define COLD
+#endif
+
 /*
  * Branch prediction hints:
  *     LIKELY(exp)   - Expression exp is likely TRUE.