Mercurial > hg > graal-jvmci-8
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 18238:4221c8332c34
Remove unnecessary padding in constants section.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Tue, 04 Nov 2014 14:06:35 +0100 |
parents | e04712c8928a |
children | f7d45e2426d4 |
comparison
equal
deleted
inserted
replaced
18237:6924bb0badc9 | 18238:4221c8332c34 |
---|---|
471 cb = nm; | 471 cb = nm; |
472 } | 472 } |
473 | 473 |
474 if (cb != NULL) { | 474 if (cb != NULL) { |
475 // Make sure the pre-calculated constants section size was correct. | 475 // Make sure the pre-calculated constants section size was correct. |
476 guarantee((cb->code_begin() - cb->content_begin()) == _constants_size, err_msg("%d != %d", (int)(cb->code_begin() - cb->content_begin()), _constants_size)); | 476 guarantee((cb->code_begin() - cb->content_begin()) >= _constants_size, err_msg("%d < %d", (int)(cb->code_begin() - cb->content_begin()), _constants_size)); |
477 } | 477 } |
478 return result; | 478 return result; |
479 } | 479 } |
480 | 480 |
481 void CodeInstaller::initialize_fields(oop compiled_code) { | 481 void CodeInstaller::initialize_fields(oop compiled_code) { |
500 | 500 |
501 // Pre-calculate the constants section size. This is required for PC-relative addressing. | 501 // Pre-calculate the constants section size. This is required for PC-relative addressing. |
502 _data_section_handle = JNIHandles::make_local(HotSpotCompiledCode::dataSection(compiled_code)); | 502 _data_section_handle = JNIHandles::make_local(HotSpotCompiledCode::dataSection(compiled_code)); |
503 guarantee(HotSpotCompiledCode::dataSectionAlignment(compiled_code) <= _constants->alignment(), "Alignment inside constants section is restricted by alignment of section begin"); | 503 guarantee(HotSpotCompiledCode::dataSectionAlignment(compiled_code) <= _constants->alignment(), "Alignment inside constants section is restricted by alignment of section begin"); |
504 _constants_size = data_section()->length(); | 504 _constants_size = data_section()->length(); |
505 if (_constants_size > 0) { | |
506 _constants_size = align_size_up(_constants_size, _constants->alignment()); | |
507 } | |
508 | 505 |
509 _data_section_patches_handle = JNIHandles::make_local(HotSpotCompiledCode::dataSectionPatches(compiled_code)); | 506 _data_section_patches_handle = JNIHandles::make_local(HotSpotCompiledCode::dataSectionPatches(compiled_code)); |
510 | 507 |
511 #ifndef PRODUCT | 508 #ifndef PRODUCT |
512 _comments_handle = JNIHandles::make_local(HotSpotCompiledCode::comments(compiled_code)); | 509 _comments_handle = JNIHandles::make_local(HotSpotCompiledCode::comments(compiled_code)); |