Skip to content

Commit

Permalink
Version 4.8.271.3 (cherry-pick)
Browse files Browse the repository at this point in the history
Merged 8779afc
Merged b237b8a
Merged 59a0641
Merged f83b8a6

PPC: Fix trampoline pool blocking.

PPC: [turbofan] Fix trampoline pool blocking.

Fix test-heap/LargeObjectSlotRecording.

Skip test-run-machops/RunComputedCodeObject on AIX and PPC64BE.

R=jkummerow@chromium.org, hablich@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1440293003 .

Cr-Commit-Position: refs/branch-heads/4.8@{crosswalk-project#5}
Cr-Branched-From: 10449d4-refs/heads/4.8.271@{crosswalk-project#1}
Cr-Branched-From: 2ebd5fc-refs/heads/master@{#31941}
  • Loading branch information
mtbrandy committed Nov 13, 2015
1 parent e0f5116 commit b6f99d7
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 4
#define V8_MINOR_VERSION 8
#define V8_BUILD_NUMBER 271
#define V8_PATCH_LEVEL 2
#define V8_PATCH_LEVEL 3

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
9 changes: 9 additions & 0 deletions src/compiler/ppc/code-generator-ppc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {

switch (opcode) {
case kArchCallCodeObject: {
v8::internal::Assembler::BlockTrampolinePoolScope block_trampoline_pool(
masm());
EnsureSpaceForLazyDeopt();
if (HasRegisterInput(instr, 0)) {
__ addi(ip, i.InputRegister(0),
Expand Down Expand Up @@ -651,6 +653,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
break;
}
case kArchCallJSFunction: {
v8::internal::Assembler::BlockTrampolinePoolScope block_trampoline_pool(
masm());
EnsureSpaceForLazyDeopt();
Register func = i.InputRegister(0);
if (FLAG_debug_code) {
Expand Down Expand Up @@ -682,6 +686,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
break;
}
case kArchLazyBailout: {
v8::internal::Assembler::BlockTrampolinePoolScope block_trampoline_pool(
masm());
EnsureSpaceForLazyDeopt();
RecordCallPosition(instr);
break;
Expand Down Expand Up @@ -1702,6 +1708,9 @@ void CodeGenerator::EnsureSpaceForLazyDeopt() {
// instruction for patching the code here.
int current_pc = masm()->pc_offset();
if (current_pc < last_lazy_deopt_pc_ + space_needed) {
// Block tramoline pool emission for duration of padding.
v8::internal::Assembler::BlockTrampolinePoolScope block_trampoline_pool(
masm());
int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize);
while (padding_size > 0) {
Expand Down
8 changes: 4 additions & 4 deletions src/heap/spaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Isolate;
// area.
//
// There is a separate large object space for objects larger than
// Page::kMaxHeapObjectSize, so that they do not have to move during
// Page::kMaxRegularHeapObjectSize, so that they do not have to move during
// collection. The large object space is paged. Pages in large object space
// may be larger than the page size.
//
Expand Down Expand Up @@ -2996,9 +2996,9 @@ class MapSpace : public PagedSpace {


// -----------------------------------------------------------------------------
// Large objects ( > Page::kMaxHeapObjectSize ) are allocated and managed by
// the large object space. A large object is allocated from OS heap with
// extra padding bytes (Page::kPageSize + Page::kObjectStartOffset).
// Large objects ( > Page::kMaxRegularHeapObjectSize ) are allocated and
// managed by the large object space. A large object is allocated from OS
// heap with extra padding bytes (Page::kPageSize + Page::kObjectStartOffset).
// A large object always starts at Page::kObjectStartOffset to a page.
// Large objects do not move during garbage collections.

Expand Down
5 changes: 4 additions & 1 deletion src/ppc/assembler-ppc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,10 @@ class Assembler : public AssemblerBase {
}

void StartBlockTrampolinePool() { trampoline_pool_blocked_nesting_++; }
void EndBlockTrampolinePool() { trampoline_pool_blocked_nesting_--; }
void EndBlockTrampolinePool() {
int count = --trampoline_pool_blocked_nesting_;
if (count == 0) CheckTrampolinePoolQuick();
}
bool is_trampoline_pool_blocked() const {
return trampoline_pool_blocked_nesting_ > 0;
}
Expand Down
8 changes: 8 additions & 0 deletions test/cctest/cctest.status
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,14 @@

}], # 'system == aix and arch == ppc64'

##############################################################################
['system == aix or (arch == ppc64 and byteorder == big)', {

# Test currently broken for platforms with function desciptors
'test-run-machops/RunComputedCodeObject' : [SKIP],

}], # 'system == aix or (arch == ppc64 and byteorder == big)'

##############################################################################
['arch == ppc and simulator_run == True or arch == ppc64 and simulator_run == True', {

Expand Down
11 changes: 6 additions & 5 deletions test/cctest/test-heap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4576,8 +4576,9 @@ TEST(LargeObjectSlotRecording) {
FixedArray* old_location = *lit;

// Allocate a large object.
const int kSize = 1000000;
Handle<FixedArray> lo = isolate->factory()->NewFixedArray(kSize, TENURED);
int size = Max(1000000, Page::kMaxRegularHeapObjectSize + KB);
CHECK(size > Page::kMaxRegularHeapObjectSize);
Handle<FixedArray> lo = isolate->factory()->NewFixedArray(size, TENURED);
CHECK(heap->lo_space()->Contains(*lo));

// Start incremental marking to active write barrier.
Expand All @@ -4587,8 +4588,8 @@ TEST(LargeObjectSlotRecording) {

// Create references from the large object to the object on the evacuation
// candidate.
const int kStep = kSize / 10;
for (int i = 0; i < kSize; i += kStep) {
const int kStep = size / 10;
for (int i = 0; i < size; i += kStep) {
lo->set(i, *lit);
CHECK(lo->get(i) == old_location);
}
Expand All @@ -4597,7 +4598,7 @@ TEST(LargeObjectSlotRecording) {
CcTest::heap()->CollectAllGarbage();

// Verify that the pointers in the large object got updated.
for (int i = 0; i < kSize; i += kStep) {
for (int i = 0; i < size; i += kStep) {
CHECK_EQ(lo->get(i), *lit);
CHECK(lo->get(i) != old_location);
}
Expand Down

0 comments on commit b6f99d7

Please sign in to comment.