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

Issue 3601010: [Isolates] Allow running multiple isolates in shell and use this in tests. (Closed)

Created:
10 years, 2 months ago by Vitaly Repeshko
Modified:
9 years, 7 months ago
Reviewers:
yurys
CC:
v8-dev
Visibility:
Public.

Description

[Isolates] Allow running multiple isolates in shell and use this in tests. Sample usage (prints a sequence of mixed 1's and 2's): $ ./shell_g -e 'while (1) print(1)' --isolate -e 'while (1) print(2)' The first group of source files (before the first --isolate) is run in the default isolate. All the other groups are run in separate isolate threads. It would be nice to use our platform.h but it drags too many includes, so I'm using pthreads on anything non-WIN32 for now. Committed: http://code.google.com/p/v8/source/detail?r=5599

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+208 lines, -49 lines) Patch
M samples/shell.cc View 4 chunks +143 lines, -35 lines 3 comments Download
M src/allocation-inl.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/isolate.h View 2 chunks +4 lines, -1 line 0 comments Download
M src/isolate.cc View 5 chunks +23 lines, -4 lines 0 comments Download
M src/top.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/testcfg.py View 3 chunks +22 lines, -5 lines 0 comments Download
M tools/liststatics.sh View 1 chunk +1 line, -1 line 0 comments Download
M tools/statics.whitelist View 1 chunk +1 line, -2 lines 1 comment Download
M tools/test.py View 4 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Vitaly Repeshko
10 years, 2 months ago (2010-10-05 17:50:31 UTC) #1
yurys
10 years, 2 months ago (2010-10-06 14:52:58 UTC) #2
LGTM

http://codereview.chromium.org/3601010/diff/1/2
File samples/shell.cc (right):

http://codereview.chromium.org/3601010/diff/1/2#newcode98
samples/shell.cc:98: if (!ExecuteString(source, file_name, false, true)) {
This code can be extracted out of the if/else expression.

http://codereview.chromium.org/3601010/diff/1/2#newcode145
samples/shell.cc:145: void* IsolateThreadEntry(void* arg) {
This function can be made a private static method on SourceGroup.

http://codereview.chromium.org/3601010/diff/1/2#newcode190
samples/shell.cc:190: }
Should we delete isolate_sources before exit here?

http://codereview.chromium.org/3601010/diff/1/9
File tools/statics.whitelist (right):

http://codereview.chromium.org/3601010/diff/1/9#newcode3
tools/statics.whitelist:3: .*\.bss.*guard variable for v8::internal::MemCopy.*
are you sure you want to commit this?

Powered by Google App Engine
This is Rietveld 408576698