Commit 46f0a651 authored by ricow@chromium.org's avatar ricow@chromium.org

MIPS: Reduced the number of threads in cctest test-lockers.

Some MIPS boards could not handle the large number of threads and failed these tests.

BUG=
TEST=
Review URL: http://codereview.chromium.org/8506008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b642b780
...@@ -204,7 +204,11 @@ static void StartJoinAndDeleteThreads(const i::List<JoinableThread*>& threads) { ...@@ -204,7 +204,11 @@ static void StartJoinAndDeleteThreads(const i::List<JoinableThread*>& threads) {
// Run many threads all locking on the same isolate // Run many threads all locking on the same isolate
TEST(IsolateLockingStress) { TEST(IsolateLockingStress) {
#ifdef V8_TARGET_ARCH_MIPS
const int kNThreads = 50;
#else
const int kNThreads = 100; const int kNThreads = 100;
#endif
i::List<JoinableThread*> threads(kNThreads); i::List<JoinableThread*> threads(kNThreads);
v8::Isolate* isolate = v8::Isolate::New(); v8::Isolate* isolate = v8::Isolate::New();
for (int i = 0; i < kNThreads; i++) { for (int i = 0; i < kNThreads; i++) {
...@@ -237,7 +241,7 @@ class IsolateNonlockingThread : public JoinableThread { ...@@ -237,7 +241,7 @@ class IsolateNonlockingThread : public JoinableThread {
// Run many threads each accessing its own isolate without locking // Run many threads each accessing its own isolate without locking
TEST(MultithreadedParallelIsolates) { TEST(MultithreadedParallelIsolates) {
#ifdef V8_TARGET_ARCH_ARM #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
const int kNThreads = 10; const int kNThreads = 10;
#else #else
const int kNThreads = 50; const int kNThreads = 50;
...@@ -275,7 +279,11 @@ class IsolateNestedLockingThread : public JoinableThread { ...@@ -275,7 +279,11 @@ class IsolateNestedLockingThread : public JoinableThread {
// Run many threads with nested locks // Run many threads with nested locks
TEST(IsolateNestedLocking) { TEST(IsolateNestedLocking) {
#ifdef V8_TARGET_ARCH_MIPS
const int kNThreads = 50;
#else
const int kNThreads = 100; const int kNThreads = 100;
#endif
v8::Isolate* isolate = v8::Isolate::New(); v8::Isolate* isolate = v8::Isolate::New();
i::List<JoinableThread*> threads(kNThreads); i::List<JoinableThread*> threads(kNThreads);
for (int i = 0; i < kNThreads; i++) { for (int i = 0; i < kNThreads; i++) {
...@@ -311,7 +319,7 @@ class SeparateIsolatesLocksNonexclusiveThread : public JoinableThread { ...@@ -311,7 +319,7 @@ class SeparateIsolatesLocksNonexclusiveThread : public JoinableThread {
// Run parallel threads that lock and access different isolates in parallel // Run parallel threads that lock and access different isolates in parallel
TEST(SeparateIsolatesLocksNonexclusive) { TEST(SeparateIsolatesLocksNonexclusive) {
#ifdef V8_TARGET_ARCH_ARM #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
const int kNThreads = 50; const int kNThreads = 50;
#else #else
const int kNThreads = 100; const int kNThreads = 100;
...@@ -385,7 +393,7 @@ class LockerUnlockerThread : public JoinableThread { ...@@ -385,7 +393,7 @@ class LockerUnlockerThread : public JoinableThread {
// Use unlocker inside of a Locker, multiple threads. // Use unlocker inside of a Locker, multiple threads.
TEST(LockerUnlocker) { TEST(LockerUnlocker) {
#ifdef V8_TARGET_ARCH_ARM #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
const int kNThreads = 50; const int kNThreads = 50;
#else #else
const int kNThreads = 100; const int kNThreads = 100;
...@@ -438,7 +446,7 @@ class LockTwiceAndUnlockThread : public JoinableThread { ...@@ -438,7 +446,7 @@ class LockTwiceAndUnlockThread : public JoinableThread {
// Use Unlocker inside two Lockers. // Use Unlocker inside two Lockers.
TEST(LockTwiceAndUnlock) { TEST(LockTwiceAndUnlock) {
#ifdef V8_TARGET_ARCH_ARM #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
const int kNThreads = 50; const int kNThreads = 50;
#else #else
const int kNThreads = 100; const int kNThreads = 100;
...@@ -559,7 +567,11 @@ class LockUnlockLockThread : public JoinableThread { ...@@ -559,7 +567,11 @@ class LockUnlockLockThread : public JoinableThread {
// Locker inside an Unlocker inside a Locker. // Locker inside an Unlocker inside a Locker.
TEST(LockUnlockLockMultithreaded) { TEST(LockUnlockLockMultithreaded) {
#ifdef V8_TARGET_ARCH_MIPS
const int kNThreads = 50;
#else
const int kNThreads = 100; const int kNThreads = 100;
#endif
v8::Isolate* isolate = v8::Isolate::New(); v8::Isolate* isolate = v8::Isolate::New();
Persistent<v8::Context> context; Persistent<v8::Context> context;
{ {
...@@ -606,7 +618,11 @@ class LockUnlockLockDefaultIsolateThread : public JoinableThread { ...@@ -606,7 +618,11 @@ class LockUnlockLockDefaultIsolateThread : public JoinableThread {
// Locker inside an Unlocker inside a Locker for default isolate. // Locker inside an Unlocker inside a Locker for default isolate.
TEST(LockUnlockLockDefaultIsolateMultithreaded) { TEST(LockUnlockLockDefaultIsolateMultithreaded) {
#ifdef V8_TARGET_ARCH_MIPS
const int kNThreads = 50;
#else
const int kNThreads = 100; const int kNThreads = 100;
#endif
Persistent<v8::Context> context; Persistent<v8::Context> context;
{ {
v8::Locker locker_; v8::Locker locker_;
...@@ -674,7 +690,7 @@ class IsolateGenesisThread : public JoinableThread { ...@@ -674,7 +690,7 @@ class IsolateGenesisThread : public JoinableThread {
// Test installing extensions in separate isolates concurrently. // Test installing extensions in separate isolates concurrently.
// http://code.google.com/p/v8/issues/detail?id=1821 // http://code.google.com/p/v8/issues/detail?id=1821
TEST(ExtensionsRegistration) { TEST(ExtensionsRegistration) {
#if defined V8_TARGET_ARCH_ARM || defined V8_HOST_ARCH_MIPS #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
const int kNThreads = 10; const int kNThreads = 10;
#else #else
const int kNThreads = 40; const int kNThreads = 40;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment