Mercurial > hg > truffle
comparison src/share/vm/oops/instanceRefKlass.cpp @ 938:b37c246bf7ce
6861660: OopMapBlock count/size confusion
Reviewed-by: tonyp, iveresov
author | jcoomes |
---|---|
date | Tue, 11 Aug 2009 15:37:23 -0700 |
parents | df6caf649ff7 |
children | 9eebd3ac74cf |
comparison
equal
deleted
inserted
replaced
937:ead53f6b615d | 938:b37c246bf7ce |
---|---|
398 // Check that we have the right class | 398 // Check that we have the right class |
399 debug_only(static bool first_time = true); | 399 debug_only(static bool first_time = true); |
400 assert(k == SystemDictionary::reference_klass() && first_time, | 400 assert(k == SystemDictionary::reference_klass() && first_time, |
401 "Invalid update of maps"); | 401 "Invalid update of maps"); |
402 debug_only(first_time = false); | 402 debug_only(first_time = false); |
403 assert(ik->nonstatic_oop_map_size() == 1, "just checking"); | 403 assert(ik->nonstatic_oop_map_count() == 1, "just checking"); |
404 | 404 |
405 OopMapBlock* map = ik->start_of_nonstatic_oop_maps(); | 405 OopMapBlock* map = ik->start_of_nonstatic_oop_maps(); |
406 | 406 |
407 // Check that the current map is (2,4) - currently points at field with | 407 // Check that the current map is (2,4) - currently points at field with |
408 // offset 2 (words) and has 4 map entries. | 408 // offset 2 (words) and has 4 map entries. |
409 debug_only(int offset = java_lang_ref_Reference::referent_offset); | 409 debug_only(int offset = java_lang_ref_Reference::referent_offset); |
410 debug_only(int length = ((java_lang_ref_Reference::discovered_offset - | 410 debug_only(int count = ((java_lang_ref_Reference::discovered_offset - |
411 java_lang_ref_Reference::referent_offset)/heapOopSize) + 1); | 411 java_lang_ref_Reference::referent_offset)/heapOopSize) + 1); |
412 | 412 |
413 if (UseSharedSpaces) { | 413 if (UseSharedSpaces) { |
414 assert(map->offset() == java_lang_ref_Reference::queue_offset && | 414 assert(map->offset() == java_lang_ref_Reference::queue_offset && |
415 map->length() == 1, "just checking"); | 415 map->count() == 1, "just checking"); |
416 } else { | 416 } else { |
417 assert(map->offset() == offset && map->length() == length, | 417 assert(map->offset() == offset && map->count() == count, |
418 "just checking"); | 418 "just checking"); |
419 | 419 |
420 // Update map to (3,1) - point to offset of 3 (words) with 1 map entry. | 420 // Update map to (3,1) - point to offset of 3 (words) with 1 map entry. |
421 map->set_offset(java_lang_ref_Reference::queue_offset); | 421 map->set_offset(java_lang_ref_Reference::queue_offset); |
422 map->set_length(1); | 422 map->set_count(1); |
423 } | 423 } |
424 } | 424 } |
425 | 425 |
426 | 426 |
427 // Verification | 427 // Verification |