List:Commits« Previous MessageNext Message »
From:marko.makela Date:November 3 2010 8:49am
Subject:bzr commit into mysql-5.1-innodb branch (marko.makela:3652) Bug#57947
View as plain text  
#At file:///home/marko/innobase/dev/mysql2a/5.1-innodb/ based on revid:sunny.bains@stripped3z1wfbc45al

 3652 Marko Mäkelä	2010-11-03
      Bug#57947 InnoDB diagnostics shows btr_block_get calls instead of real callers
      
      Improve the diagnostics of buffer pool accesses for B-trees,
      so that the file names and line numbers of the real calls are shown
      instead of the line of the buf_page_get() call in btr_block_get().
      
      btr_page_get(): Replaced with a macro.
      
      btr_block_get_func(): Renamed from btr_block_get(). Add file, line.
      
      btr_block_get(): A macro that passes the __FILE__, __LINE__ to
      btr_block_get_func().

    modified:
      storage/innodb_plugin/ChangeLog
      storage/innodb_plugin/include/btr0btr.h
      storage/innodb_plugin/include/btr0btr.ic
=== modified file 'storage/innodb_plugin/ChangeLog'
--- a/storage/innodb_plugin/ChangeLog	revid:sunny.bains@stripped101103014053-rlghb3z1wfbc45al
+++ b/storage/innodb_plugin/ChangeLog	revid:marko.makela@stripped0ovgq1eh1mw4i6t
@@ -1,3 +1,9 @@
+2010-11-03	The InnoDB Team
+
+	* include/btr0btr.h, include/btr0btr.ic:
+	Fix Bug#57947 InnoDB diagnostics shows btr_block_get calls
+	instead of real callers
+
 2010-11-02	The InnoDB Team
 
 	* row/row0sel.c:

=== modified file 'storage/innodb_plugin/include/btr0btr.h'
--- a/storage/innodb_plugin/include/btr0btr.h	revid:sunny.bains@stripped3z1wfbc45al
+++ b/storage/innodb_plugin/include/btr0btr.h	revid:marko.makela@strippedw4i6t
@@ -94,26 +94,50 @@ btr_root_get(
 Gets a buffer page and declares its latching order level. */
 UNIV_INLINE
 buf_block_t*
-btr_block_get(
-/*==========*/
-	ulint	space,		/*!< in: space id */
-	ulint	zip_size,	/*!< in: compressed page size in bytes
-				or 0 for uncompressed pages */
-	ulint	page_no,	/*!< in: page number */
-	ulint	mode,		/*!< in: latch mode */
-	mtr_t*	mtr);		/*!< in: mtr */
+btr_block_get_func(
+/*===============*/
+	ulint		space,		/*!< in: space id */
+	ulint		zip_size,	/*!< in: compressed page size in bytes
+					or 0 for uncompressed pages */
+	ulint		page_no,	/*!< in: page number */
+	ulint		mode,		/*!< in: latch mode */
+	const char*	file,		/*!< in: file name */
+	ulint		line,		/*!< in: line where called */
+	mtr_t*		mtr)		/*!< in/out: mtr */
+	__attribute__((nonnull));
+/** Gets a buffer page and declares its latching order level.
+@param space	tablespace identifier
+@param zip_size	compressed page size in bytes or 0 for uncompressed pages
+@param page_no	page number
+@param mode	latch mode
+@param mtr	mini-transaction handle
+@return the block descriptor */
+# define btr_block_get(space,zip_size,page_no,mode,mtr) \
+	btr_block_get_func(space,zip_size,page_no,mode,__FILE__,__LINE__,mtr)
 /**************************************************************//**
 Gets a buffer page and declares its latching order level. */
 UNIV_INLINE
 page_t*
-btr_page_get(
-/*=========*/
-	ulint	space,		/*!< in: space id */
-	ulint	zip_size,	/*!< in: compressed page size in bytes
-				or 0 for uncompressed pages */
-	ulint	page_no,	/*!< in: page number */
-	ulint	mode,		/*!< in: latch mode */
-	mtr_t*	mtr);		/*!< in: mtr */
+btr_page_get_func(
+/*==============*/
+	ulint		space,		/*!< in: space id */
+	ulint		zip_size,	/*!< in: compressed page size in bytes
+					or 0 for uncompressed pages */
+	ulint		page_no,	/*!< in: page number */
+	ulint		mode,		/*!< in: latch mode */
+	const char*	file,		/*!< in: file name */
+	ulint		line,		/*!< in: line where called */
+	mtr_t*		mtr)		/*!< in/out: mtr */
+	__attribute__((nonnull));
+/** Gets a buffer page and declares its latching order level.
+@param space	tablespace identifier
+@param zip_size	compressed page size in bytes or 0 for uncompressed pages
+@param page_no	page number
+@param mode	latch mode
+@param mtr	mini-transaction handle
+@return the uncompressed page frame */
+# define btr_page_get(space,zip_size,page_no,mode,mtr) \
+	buf_block_get_frame(btr_block_get(space,zip_size,page_no,mode,mtr))
 #endif /* !UNIV_HOTBACKUP */
 /**************************************************************//**
 Gets the index id field of a page.

=== modified file 'storage/innodb_plugin/include/btr0btr.ic'
--- a/storage/innodb_plugin/include/btr0btr.ic	revid:sunny.bains@stripped1wfbc45al
+++ b/storage/innodb_plugin/include/btr0btr.ic	revid:marko.makela@stripped4i6t
@@ -39,18 +39,21 @@ Created 6/2/1994 Heikki Tuuri
 Gets a buffer page and declares its latching order level. */
 UNIV_INLINE
 buf_block_t*
-btr_block_get(
-/*==========*/
-	ulint	space,		/*!< in: space id */
-	ulint	zip_size,	/*!< in: compressed page size in bytes
-				or 0 for uncompressed pages */
-	ulint	page_no,	/*!< in: page number */
-	ulint	mode,		/*!< in: latch mode */
-	mtr_t*	mtr)		/*!< in: mtr */
+btr_block_get_func(
+/*===============*/
+	ulint		space,		/*!< in: space id */
+	ulint		zip_size,	/*!< in: compressed page size in bytes
+					or 0 for uncompressed pages */
+	ulint		page_no,	/*!< in: page number */
+	ulint		mode,		/*!< in: latch mode */
+	const char*	file,		/*!< in: file name */
+	ulint		line,		/*!< in: line where called */
+	mtr_t*		mtr)		/*!< in/out: mtr */
 {
 	buf_block_t*	block;
 
-	block = buf_page_get(space, zip_size, page_no, mode, mtr);
+	block = buf_page_get_gen(space, zip_size, page_no, mode,
+				 NULL, BUF_GET, file, line, mtr);
 
 	if (mode != RW_NO_LATCH) {
 
@@ -61,23 +64,6 @@ btr_block_get(
 }
 
 /**************************************************************//**
-Gets a buffer page and declares its latching order level. */
-UNIV_INLINE
-page_t*
-btr_page_get(
-/*=========*/
-	ulint	space,		/*!< in: space id */
-	ulint	zip_size,	/*!< in: compressed page size in bytes
-				or 0 for uncompressed pages */
-	ulint	page_no,	/*!< in: page number */
-	ulint	mode,		/*!< in: latch mode */
-	mtr_t*	mtr)		/*!< in: mtr */
-{
-	return(buf_block_get_frame(btr_block_get(space, zip_size, page_no,
-						 mode, mtr)));
-}
-
-/**************************************************************//**
 Sets the index id field of a page. */
 UNIV_INLINE
 void

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20101103084948-d0ovgq1eh1mw4i6t.bundle
Thread
bzr commit into mysql-5.1-innodb branch (marko.makela:3652) Bug#57947marko.makela3 Nov