List:Commits« Previous MessageNext Message »
From:marko.makela Date:April 6 2011 6:42am
Subject:bzr push into mysql-trunk-innodb branch (marko.makela:3564 to 3565)
View as plain text  
 3565 Marko Mäkelä	2011-04-06 [merge]
      Merge mysql-5.5-innodb to mysql-trunk-innodb.

    modified:
      storage/innobase/include/os0thread.h
      storage/innobase/include/univ.i
      storage/innobase/include/ut0dbg.h
      storage/innobase/include/ut0ut.h
 3564 Marko Mäkelä	2011-04-05 [merge]
      Merge mysql-5.5-innodb to mysql-trunk-innodb.

    modified:
      storage/innobase/include/os0thread.h
      storage/innobase/os/os0thread.c
=== modified file 'storage/innobase/include/os0thread.h'
--- a/storage/innobase/include/os0thread.h	revid:marko.makela@stripped
+++ b/storage/innobase/include/os0thread.h	revid:marko.makela@oracle.com-20110406063525-umeo92ottl1bmys1
@@ -109,7 +109,7 @@ os_thread_exit(
 /*===========*/
 	void*	exit_value)	/*!< in: exit value; in Windows this void*
 				is cast as a DWORD */
-	__attribute__((cold, noreturn));
+	UNIV_COLD __attribute__((noreturn));
 /*****************************************************************//**
 Returns the thread identifier of current thread.
 @return	current thread identifier */

=== modified file 'storage/innobase/include/univ.i'
--- a/storage/innobase/include/univ.i	revid:marko.makela@stripped
+++ b/storage/innobase/include/univ.i	revid:marko.makela@oracle.com-20110406063525-umeo92ottl1bmys1
@@ -266,6 +266,19 @@ easy way to get it to work. See http://b
 #else
 # define UNIV_INTERN
 #endif
+#if defined __GNUC__ && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+/** Starting with GCC 4.3, the "cold" attribute is used to inform the
+compiler that a function is unlikely executed.  The function is
+optimized for size rather than speed and on many targets it is placed
+into special subsection of the text section so all cold functions
+appears close together improving code locality of non-cold parts of
+program.  The paths leading to call of cold functions within code are
+marked as unlikely by the branch prediction mechanism.  optimize a
+rarely invoked function for size instead for speed. */
+# define UNIV_COLD __attribute__((cold))
+#else
+# define UNIV_COLD /* empty */
+#endif
 
 #ifndef UNIV_MUST_NOT_INLINE
 /* Definition for inline version */

=== modified file 'storage/innobase/include/ut0dbg.h'
--- a/storage/innobase/include/ut0dbg.h	revid:marko.makela@stripped
+++ b/storage/innobase/include/ut0dbg.h	revid:marko.makela@strippedom-20110406063525-umeo92ottl1bmys1
@@ -53,7 +53,7 @@ ut_dbg_assertion_failed(
 	const char*	expr,	/*!< in: the failed assertion */
 	const char*	file,	/*!< in: source file containing the assertion */
 	ulint		line)	/*!< in: line number of the assertion */
-	__attribute__((nonnull(2), cold));
+	UNIV_COLD __attribute__((nonnull(2)));
 
 #if defined(__WIN__) || defined(__INTEL_COMPILER)
 # undef UT_DBG_USE_ABORT

=== modified file 'storage/innobase/include/ut0ut.h'
--- a/storage/innobase/include/ut0ut.h	revid:marko.makela@stripped
+++ b/storage/innobase/include/ut0ut.h	revid:marko.makela@oracle.com-20110406063525-umeo92ottl1bmys1
@@ -280,7 +280,7 @@ void
 ut_print_timestamp(
 /*===============*/
 	FILE*	file)	/*!< in: file where to print */
-	__attribute__((nonnull, cold));
+	UNIV_COLD __attribute__((nonnull));
 /**********************************************************//**
 Sprintfs a timestamp to a buffer, 13..14 chars plus terminating NUL. */
 UNIV_INTERN

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20110406063525-umeo92ottl1bmys1.bundle
Thread
bzr push into mysql-trunk-innodb branch (marko.makela:3564 to 3565) marko.makela6 Apr