Mercurial > hg > truffle
diff src/share/vm/asm/codeBuffer.hpp @ 4059:44ce519bc3d1
7104960: JSR 292: +VerifyMethodHandles in product JVM can overflow buffer
Reviewed-by: kvn, jrose, twisti
author | never |
---|---|
date | Tue, 08 Nov 2011 10:31:53 -0800 |
parents | 1d1603768966 |
children | da91efe96a93 |
line wrap: on
line diff
--- a/src/share/vm/asm/codeBuffer.hpp Mon Nov 07 14:33:57 2011 -0800 +++ b/src/share/vm/asm/codeBuffer.hpp Tue Nov 08 10:31:53 2011 -0800 @@ -362,10 +362,8 @@ // helper for CodeBuffer::expand() void take_over_code_from(CodeBuffer* cs); -#ifdef ASSERT // ensure sections are disjoint, ordered, and contained in the blob - bool verify_section_allocation(); -#endif + void verify_section_allocation(); // copies combined relocations to the blob, returns bytes copied // (if target is null, it is a dry run only, just for sizing) @@ -393,7 +391,7 @@ assert(code_start != NULL, "sanity"); initialize_misc("static buffer"); initialize(code_start, code_size); - assert(verify_section_allocation(), "initial use of buffer OK"); + verify_section_allocation(); } // (2) CodeBuffer referring to pre-allocated CodeBlob. @@ -545,6 +543,9 @@ void block_comment(intptr_t offset, const char * comment) PRODUCT_RETURN; + // Log a little info about section usage in the CodeBuffer + void log_section_sizes(const char* name); + #ifndef PRODUCT public: // Printing / Decoding