[runtime] Mark mono_set_pending_exception () as a cold function, so calling code...
authorZoltan Varga <vargaz@gmail.com>
Tue, 24 Feb 2015 01:05:40 +0000 (20:05 -0500)
committerZoltan Varga <vargaz@gmail.com>
Tue, 24 Feb 2015 01:05:40 +0000 (20:05 -0500)
mono/metadata/object-internals.h
mono/utils/mono-compiler.h

index 2fad026e3eef4c30651a0d2640e87398652ebc1e..4315a592d5a73909e995b561378459dc0a422419 100644 (file)
@@ -645,7 +645,7 @@ typedef void        (*MonoFreeMethodFunc)    (MonoDomain *domain, MonoMethod *meth
 /* Used to initialize the method pointers inside vtables */
 typedef gboolean    (*MonoInitVTableFunc)    (MonoVTable *vtable);
 
-void mono_set_pending_exception (MonoException *exc) MONO_INTERNAL;
+MONO_COLD void mono_set_pending_exception (MonoException *exc) MONO_INTERNAL;
 
 /* remoting and async support */
 
index 24c92fbae5207e3a548351a40dfcdce30562b266..51d3a4f4bbd3393781a0cf76f330ccee77775192 100644 (file)
@@ -275,5 +275,11 @@ typedef SSIZE_T ssize_t;
 #define MONO_NEVER_INLINE
 #endif
 
+#ifdef __GNUC__
+#define MONO_COLD __attribute__((cold))
+#else
+#define MONO_COLD __attribute__((cold))
+#endif
+
 #endif /* __UTILS_MONO_COMPILER_H__*/