Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Side by Side Diff: test/cctest/test-lockers.cc

Issue 6995027: Speculative fix for MultithreadedParallelIsolates on ARM (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: + Reenabled test Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2011 the V8 project authors. All rights reserved. 1 // Copyright 2007-2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 CHECK_EQ(isolate, v8::internal::Isolate::Current()); 233 CHECK_EQ(isolate, v8::internal::Isolate::Current());
234 CalcFibAndCheck(); 234 CalcFibAndCheck();
235 } 235 }
236 isolate->Dispose(); 236 isolate->Dispose();
237 } 237 }
238 private: 238 private:
239 }; 239 };
240 240
241 // Run many threads each accessing its own isolate without locking 241 // Run many threads each accessing its own isolate without locking
242 TEST(MultithreadedParallelIsolates) { 242 TEST(MultithreadedParallelIsolates) {
243 #ifdef V8_TARGET_ARCH_ARM
244 const int kNThreads = 10;
245 #else
243 const int kNThreads = 50; 246 const int kNThreads = 50;
247 #endif
244 i::List<JoinableThread*> threads(kNThreads); 248 i::List<JoinableThread*> threads(kNThreads);
245 for (int i = 0; i < kNThreads; i++) { 249 for (int i = 0; i < kNThreads; i++) {
246 threads.Add(new IsolateNonlockingThread()); 250 threads.Add(new IsolateNonlockingThread());
247 } 251 }
248 StartJoinAndDeleteThreads(threads); 252 StartJoinAndDeleteThreads(threads);
249 } 253 }
250 254
251 255
252 class IsolateNestedLockingThread : public JoinableThread { 256 class IsolateNestedLockingThread : public JoinableThread {
253 public: 257 public:
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 v8::Locker locker_; 600 v8::Locker locker_;
597 v8::HandleScope handle_scope; 601 v8::HandleScope handle_scope;
598 context = v8::Context::New(); 602 context = v8::Context::New();
599 } 603 }
600 i::List<JoinableThread*> threads(kNThreads); 604 i::List<JoinableThread*> threads(kNThreads);
601 for (int i = 0; i < kNThreads; i++) { 605 for (int i = 0; i < kNThreads; i++) {
602 threads.Add(new LockUnlockLockDefaultIsolateThread(context)); 606 threads.Add(new LockUnlockLockDefaultIsolateThread(context));
603 } 607 }
604 StartJoinAndDeleteThreads(threads); 608 StartJoinAndDeleteThreads(threads);
605 } 609 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698