| 6724 | }; |
| 6725 | |
| 6726 | GcIntArray* makeSimpleFrameMapTable(MyThread* t, |
| 6727 | Context* context, |
| 6728 | uint8_t* start, |
| 6729 | TraceElement** elements, |
| 6730 | unsigned elementCount) |
| 6731 | { |
| 6732 | unsigned mapSize = frameMapSizeInBits(t, context->method); |
| 6733 | GcIntArray* table = makeIntArray( |
| 6734 | t, elementCount + ceilingDivide(elementCount * mapSize, 32)); |
| 6735 | |
| 6736 | assertT(t, |
| 6737 | table->length() |
| 6738 | == elementCount + simpleFrameMapTableSize(t, context->method, table)); |
| 6739 | |
| 6740 | for (unsigned i = 0; i < elementCount; ++i) { |
| 6741 | TraceElement* p = elements[i]; |
| 6742 | |
| 6743 | table->body()[i] = static_cast<intptr_t>(p->address->value()) |
| 6744 | - reinterpret_cast<intptr_t>(start); |
| 6745 | |
| 6746 | assertT( |
| 6747 | t, |
| 6748 | elementCount + ceilingDivide((i + 1) * mapSize, 32) <= table->length()); |
| 6749 | |
| 6750 | if (mapSize) { |
| 6751 | copyFrameMap( |
| 6752 | &table->body()[elementCount], p->map, mapSize, i * mapSize, p); |
| 6753 | } |
| 6754 | } |
| 6755 | |
| 6756 | return table; |
| 6757 | } |
| 6758 | |
| 6759 | void insertCallNode(MyThread* t, GcCallNode* node); |
| 6760 |
no test coverage detected