Mercurial > hg > truffle
comparison src/share/vm/services/memBaseline.cpp @ 11198:1e6d5dec4a4e
Merge.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 05 Aug 2013 13:20:06 +0200 |
parents | 72fce0b2d341 |
children | 833b0f92429a |
comparison
equal
deleted
inserted
replaced
11197:3479ab380552 | 11198:1e6d5dec4a4e |
---|---|
128 _total_malloced += size; | 128 _total_malloced += size; |
129 _malloc_data[index].inc(size); | 129 _malloc_data[index].inc(size); |
130 if (malloc_ptr->is_arena_record()) { | 130 if (malloc_ptr->is_arena_record()) { |
131 // see if arena memory record present | 131 // see if arena memory record present |
132 MemPointerRecord* next_malloc_ptr = (MemPointerRecordEx*)malloc_itr.peek_next(); | 132 MemPointerRecord* next_malloc_ptr = (MemPointerRecordEx*)malloc_itr.peek_next(); |
133 if (next_malloc_ptr->is_arena_memory_record()) { | 133 if (next_malloc_ptr != NULL && next_malloc_ptr->is_arena_memory_record()) { |
134 assert(next_malloc_ptr->is_memory_record_of_arena(malloc_ptr), | 134 assert(next_malloc_ptr->is_memory_record_of_arena(malloc_ptr), |
135 "Arena records do not match"); | 135 "Arena records do not match"); |
136 size = next_malloc_ptr->size(); | 136 size = next_malloc_ptr->size(); |
137 _arena_data[index].inc(size); | 137 _arena_data[index].inc(size); |
138 used_arena_size += size; | 138 used_arena_size += size; |
484 int MemBaseline::malloc_sort_by_addr(const void* p1, const void* p2) { | 484 int MemBaseline::malloc_sort_by_addr(const void* p1, const void* p2) { |
485 assert(MemTracker::is_on(), "Just check"); | 485 assert(MemTracker::is_on(), "Just check"); |
486 const MemPointerRecord* mp1 = (const MemPointerRecord*)p1; | 486 const MemPointerRecord* mp1 = (const MemPointerRecord*)p1; |
487 const MemPointerRecord* mp2 = (const MemPointerRecord*)p2; | 487 const MemPointerRecord* mp2 = (const MemPointerRecord*)p2; |
488 int delta = UNSIGNED_COMPARE(mp1->addr(), mp2->addr()); | 488 int delta = UNSIGNED_COMPARE(mp1->addr(), mp2->addr()); |
489 assert(delta != 0, "dup pointer"); | 489 assert(p1 == p2 || delta != 0, "dup pointer"); |
490 return delta; | 490 return delta; |
491 } | 491 } |
492 | 492 |