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

Issue 435003: Patch for allowing several V8 instances in process:... (Closed)

Description

Straightforward patch for allowing several V8 instances in process with retaining external API: - Introduced V8ContextProvider, V8ContextBinder, AllowSeveralV8InstancesInProcess classes to public api (include\v8.h), - Created v8::internal::V8Context class to hold the data of separate objects of v8 instance - Created v8_context() inline function to return V8Context for accessing the data, in case there is no AllowSeveralV8InstancesInProcess classes statically instantiated the function just returns global pointer otherwise the data is retrieved from thread local variable - Wrapped with locking dtoa calls in conversions.cc and pointer bounds handling/time calc activities in platform-win32.cc, effectively doing mutex locking when AllowSeveralV8InstancesInProcess was instantiated - Most of all other changes like moved static data of class/file XXX to XXXData. - Moved static data of v8::internal::V8, static flag from v8::Locker, static callback pointer exception_behavior from api.cc into v8::internal::V8Data as instance variables - Moved static data of v8::internal::ThreadManager, v8::internal::ContextSwitcher, v8::internal::ThreadState, static Thread::LocalStorageKey variables into v8::internal::ThreadManagerData - Moved static data of v8::internal::Heap into v8::internal::HeapData as instance variables. - MarkObjectVisitor and UnmarkObjectVisitor allocated on stack instead of static variables. - static void MarkObjectRecursively(Object** p); becomes member of v8::internal::MarkObjectVisitor - static void UnmarkObjectRecursively(Object** p); becomes member of v8::internal::UnmarkObjectVisitor - Moved static data of heap.cc into v8::internal::PrivateHeapData as instance variables. - static void MarkRootObjectRecursively(Object** root); moved to v8::internal::PrivateHeapData - static data and types of v8::internal::TranscendentalCache moved to v8::internal::TranscendentalCacheData as instance variables / types. - static data and types of v8::internal::DescriptorLookupCache moved to v8::internal::DescriptorLookupCacheData as instance variables / types. - static data and types of v8::internal::KeyedLookupCacheData moved to v8::internal::KeyedLookupCacheDataData as instance variables / types - static data of v8::internal::Zone, v8::internal::ZoneScope, v8::internal::Zone, v8::internal::AssertNoZoneAllocation, v8::internal::Segment moved to v8:internal::ZoneData - static data of v8::internal::Top moved to v8::internal::TopData, static data of top.cc moved to v8::internal::TopPrivateData as instance variables - static data of v8::internal::StackGuard moved to v8::internal::StackGuard and static data of execution.cc moved to v8::internal::StackGuardPrivateData as instance variables - static data of v8::internal::RegExpStack and static data of regexp-macro-assembler.cc, jsregexp.cc moved to v8::internal::RegExpStackData as instance variables - static data of v8::internal::Serializer moved to class v8::internal::SerializerData, static data of serializer.cc (ExternalReferenceTable, SerializationAddressMapper) moved to v8::internal::SerializerPrivateData - static data of v8::internal::ContextSlotCache moved to v8::internal::ContextSlotCacheData - HandleScopeImplementer singleton is member of v8::internal::V8Context now - Static data of v8::internal::StubCache and v8::internal::CompilationCache become instance data of v8::internal::StubCacheData and v8::internal::CompilationCachePrivateData - All mutable statics of v8::internal::GlobalHandles become instance data of v8::internal::GlobalHandlesData - All mutable statics of v8::internal::MemoryAllocator become instance data of v8::internal::MemoryAllocatorData - All mutable statics of v8::internal::CodeRange become instance data of v8::internal::CodeRangeData - All mutable statics of v8::internal::MarkCompactCollector become instance data of v8::internal::MarkCompactCollectorData - All mutable statics of v8::internal::RelocatableData become instance data of v8::internal::RelocatableData - All mutable statics of v8::internal::CodeGenerator become instance data of v8::internal::CodeGeneratorData - All mutable statics of v8::internal::Bootstrapper become instance data of v8::internal::BootstrapperData - All mutable statics of v8::internal::Scanner become instance data of v8::internal::ScannerData - All mutable statics of v8::internal::Compiler become instance data of v8::internal::CompilerData - All mutable statics of v8::internal::PreallocatedStorage, v8::internal::Page, v8::internal::NativeAllocationChecker become instance data of v8::internal::StorageData - All mutable statics of v8::internal::StatsTable become instance data of v8::internal::StatsTableData - All mutable statics of v8::internal::Runtime become instance data of v8::internal::RuntimeData - All mutable statics of v8::internal::Assembler become instance data of v8::internal::AssemblerData - All mutable statics of api.cc become instance data of v8::internal::ApiData, except extensions - All mutable statics of v8::internal::Bultins become instance data of v8::internal::BuiltinsData - All mutable statics of v8::internal::Debug become instance data of v8::internal::DebugData - All mutable statics of v8::internal::Debugger become instance data of v8::internal::DebuggerData At this point 10 instances of V8 can run the benchmark for i386/Win32 :) - Extensions processed in bootstrapper with v8shareddata lock if needed - Counters class instance become a member of V8Context - static instance of GlobalHandler::Pool moved to v8::internal::GlobalInstancePrivateData - shell / cctest able to run with custom number of v8instances (not all tests are ready for this :) - Statics of Logger and Log class moved to LoggerData/LogData - Put all changes to forked V8 repository git://github.com/nicity/Embeddable-V8.git - Handled shared data for Assembler on 64bit / Arm cpu - Proper locking for reading/writing heap bounds for MacOS, Linux, BSD BUG=http://code.google.com/p/v8/issues/detail?id=510 TEST=All tests should pass

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Patch Set 16 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4967 lines, -2940 lines) Patch
M AUTHORS View 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M include/v8.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +54 lines, -3 lines 0 comments Download
M samples/shell.cc View 14 15 3 chunks +53 lines, -3 lines 0 comments Download
M src/SConscript View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M src/allocation.h View 12 13 14 15 3 chunks +55 lines, -38 lines 0 comments Download
M src/allocation.cc View 12 13 14 15 5 chunks +23 lines, -12 lines 0 comments Download
M src/api.h View 12 13 14 15 1 chunk +17 lines, -0 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 24 chunks +39 lines, -31 lines 0 comments Download
M src/arm/assembler-arm.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/arm/assembler-arm.cc View 3 chunks +24 lines, -7 lines 0 comments Download
M src/arm/builtins-arm.cc View 14 15 4 chunks +4 lines, -4 lines 0 comments Download
M src/arm/disasm-arm.cc View 12 13 14 15 1 chunk +2 lines, -1 line 0 comments Download
M src/arm/ic-arm.cc View 14 15 1 chunk +1 line, -1 line 0 comments Download
M src/arm/stub-cache-arm.cc View 14 15 9 chunks +12 lines, -12 lines 0 comments Download
M src/assembler.h View 12 13 14 15 2 chunks +21 lines, -10 lines 0 comments Download
M src/assembler.cc View 12 13 14 15 3 chunks +3 lines, -4 lines 0 comments Download
M src/bootstrapper.h View 12 13 14 15 1 chunk +13 lines, -0 lines 0 comments Download
M src/bootstrapper.cc View 12 13 14 15 15 chunks +112 lines, -66 lines 0 comments Download
M src/builtins.h View 12 13 14 15 4 chunks +39 lines, -20 lines 0 comments Download
M src/builtins.cc View 12 13 14 15 7 chunks +24 lines, -21 lines 0 comments Download
M src/code-stubs.cc View 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M src/codegen.h View 12 13 14 15 1 chunk +7 lines, -6 lines 0 comments Download
M src/codegen.cc View 12 13 14 15 2 chunks +35 lines, -2 lines 0 comments Download
M src/compilation-cache.h View 10 11 12 13 14 15 1 chunk +13 lines, -0 lines 0 comments Download
M src/compilation-cache.cc View 10 11 12 13 14 15 10 chunks +65 lines, -29 lines 0 comments Download
M src/compiler.h View 12 13 14 15 1 chunk +8 lines, -0 lines 0 comments Download
M src/compiler.cc View 12 13 14 15 8 chunks +12 lines, -14 lines 0 comments Download
M src/conversions.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +12 lines, -7 lines 0 comments Download
M src/counters.h View 12 13 14 15 4 chunks +27 lines, -15 lines 0 comments Download
M src/counters.cc View 12 13 14 15 1 chunk +5 lines, -3 lines 0 comments Download
M src/dateparser.h View 12 13 14 15 3 chunks +4 lines, -1 line 0 comments Download
M src/debug.h View 12 13 14 15 7 chunks +165 lines, -113 lines 0 comments Download
M src/debug.cc View 12 13 14 15 43 chunks +206 lines, -174 lines 0 comments Download
M src/disasm.h View 12 13 14 15 2 chunks +8 lines, -0 lines 0 comments Download
M src/disassembler.h View 12 13 14 15 1 chunk +4 lines, -1 line 0 comments Download
M src/disassembler.cc View 12 13 14 15 2 chunks +10 lines, -1 line 0 comments Download
M src/execution.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +67 lines, -39 lines 0 comments Download
M src/execution.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +88 lines, -45 lines 0 comments Download
M src/factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -3 lines 0 comments Download
M src/flags.cc View 14 15 2 chunks +3 lines, -0 lines 0 comments Download
M src/frame-element.cc View 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M src/global-handles.h View 10 11 12 13 14 15 3 chunks +65 lines, -34 lines 0 comments Download
M src/global-handles.cc View 10 11 12 13 14 15 17 chunks +56 lines, -33 lines 0 comments Download
M src/handles.h View 10 11 12 13 14 15 3 chunks +21 lines, -13 lines 0 comments Download
M src/handles.cc View 10 11 12 13 14 15 8 chunks +25 lines, -22 lines 0 comments Download
M src/heap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 21 chunks +289 lines, -165 lines 0 comments Download
M src/heap.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 80 chunks +577 lines, -478 lines 0 comments Download
M src/heap-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +52 lines, -43 lines 0 comments Download
M src/ia32/assembler-ia32.h View 12 13 14 15 6 chunks +35 lines, -12 lines 0 comments Download
M src/ia32/assembler-ia32.cc View 12 13 14 15 8 chunks +27 lines, -25 lines 0 comments Download
M src/ia32/builtins-ia32.cc View 14 15 5 chunks +5 lines, -5 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 14 15 17 chunks +17 lines, -17 lines 0 comments Download
M src/ia32/disasm-ia32.cc View 12 13 14 15 3 chunks +5 lines, -3 lines 0 comments Download
M src/ia32/ic-ia32.cc View 14 15 4 chunks +4 lines, -4 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 14 15 21 chunks +24 lines, -24 lines 0 comments Download
M src/jsregexp.cc View 8 9 10 11 12 13 14 15 6 chunks +14 lines, -13 lines 0 comments Download
M src/jump-target.h View 12 13 14 15 3 chunks +24 lines, -2 lines 0 comments Download
M src/jump-target.cc View 12 13 14 15 2 chunks +2 lines, -4 lines 0 comments Download
M src/log.h View 15 3 chunks +50 lines, -29 lines 0 comments Download
M src/log.cc View 14 15 31 chunks +143 lines, -98 lines 0 comments Download
M src/log-inl.h View 15 2 chunks +4 lines, -3 lines 0 comments Download
M src/log-utils.h View 15 5 chunks +57 lines, -42 lines 0 comments Download
M src/log-utils.cc View 15 8 chunks +57 lines, -51 lines 0 comments Download
M src/mark-compact.h View 12 13 14 15 5 chunks +95 lines, -67 lines 0 comments Download
M src/mark-compact.cc View 12 13 14 15 24 chunks +131 lines, -86 lines 0 comments Download
M src/objects.h View 12 13 14 15 3 chunks +32 lines, -4 lines 0 comments Download
M src/objects.cc View 12 13 14 15 13 chunks +26 lines, -17 lines 0 comments Download
M src/parser.cc View 14 15 4 chunks +6 lines, -6 lines 0 comments Download
M src/platform-freebsd.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M src/platform-linux.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M src/platform-macos.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M src/platform-openbsd.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M src/platform-win32.cc View 13 14 15 4 chunks +10 lines, -6 lines 0 comments Download
M src/regexp-macro-assembler.cc View 8 9 10 11 12 13 14 15 2 chunks +2 lines, -1 line 0 comments Download
M src/regexp-stack.h View 8 9 10 11 12 13 14 15 4 chunks +52 lines, -23 lines 0 comments Download
M src/regexp-stack.cc View 8 9 10 11 12 13 14 15 3 chunks +36 lines, -25 lines 0 comments Download
M src/register-allocator.cc View 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M src/rewriter.cc View 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M src/runtime.h View 12 13 14 15 1 chunk +3 lines, -0 lines 0 comments Download
M src/runtime.cc View 12 13 14 15 21 chunks +79 lines, -35 lines 0 comments Download
M src/scanner.h View 12 13 14 15 4 chunks +21 lines, -9 lines 0 comments Download
M src/scanner.cc View 12 13 14 15 13 chunks +36 lines, -14 lines 0 comments Download
M src/scopeinfo.h View 10 11 12 13 14 15 3 chunks +17 lines, -9 lines 0 comments Download
M src/scopeinfo.cc View 10 11 12 13 14 15 5 chunks +20 lines, -14 lines 0 comments Download
M src/serialize.h View 10 11 12 13 14 15 3 chunks +30 lines, -10 lines 0 comments Download
M src/serialize.cc View 10 11 12 13 14 15 7 chunks +45 lines, -22 lines 0 comments Download
M src/spaces.h View 12 13 14 15 6 chunks +93 lines, -68 lines 0 comments Download
M src/spaces.cc View 12 13 14 15 17 chunks +148 lines, -126 lines 0 comments Download
M src/spaces-inl.h View 12 13 14 15 3 chunks +11 lines, -7 lines 0 comments Download
M src/stub-cache.h View 10 11 12 13 14 15 3 chunks +23 lines, -10 lines 0 comments Download
M src/stub-cache.cc View 10 11 12 13 14 15 9 chunks +23 lines, -13 lines 0 comments Download
M src/top.h View 8 9 10 11 12 13 14 15 10 chunks +84 lines, -40 lines 0 comments Download
M src/top.cc View 8 9 10 11 12 13 14 15 25 chunks +276 lines, -213 lines 0 comments Download
M src/usage-analyzer.cc View 14 15 1 chunk +1 line, -1 line 0 comments Download
M src/v8.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +44 lines, -14 lines 0 comments Download
M src/v8.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +21 lines, -14 lines 0 comments Download
M src/v8-counters.h View 14 15 2 chunks +13 lines, -4 lines 0 comments Download
M src/v8-counters.cc View 14 15 1 chunk +30 lines, -15 lines 0 comments Download
A src/v8-global-context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +183 lines, -0 lines 0 comments Download
A src/v8-global-context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +204 lines, -0 lines 0 comments Download
M src/v8threads.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +54 lines, -38 lines 0 comments Download
M src/v8threads.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 chunks +78 lines, -69 lines 0 comments Download
M src/x64/assembler-x64.h View 6 chunks +29 lines, -11 lines 0 comments Download
M src/x64/assembler-x64.cc View 14 15 9 chunks +36 lines, -23 lines 0 comments Download
M src/x64/builtins-x64.cc View 14 15 5 chunks +5 lines, -5 lines 0 comments Download
M src/x64/codegen-x64.cc View 14 15 11 chunks +11 lines, -11 lines 0 comments Download
M src/x64/disasm-x64.cc View 12 13 14 15 3 chunks +5 lines, -3 lines 0 comments Download
M src/x64/ic-x64.cc View 14 15 4 chunks +4 lines, -4 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 14 15 21 chunks +24 lines, -24 lines 0 comments Download
M src/zone.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +43 lines, -22 lines 0 comments Download
M src/zone.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +21 lines, -28 lines 0 comments Download
M src/zone-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +12 lines, -7 lines 0 comments Download
M test/cctest/cctest.h View 14 15 3 chunks +15 lines, -1 line 0 comments Download
M test/cctest/cctest.cc View 14 15 1 chunk +13 lines, -1 line 0 comments Download
M test/cctest/test-debug.cc View 12 13 14 15 2 chunks +3 lines, -2 lines 0 comments Download
M test/cctest/test-serialize.cc View 14 15 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Maxim.Mossienko
Please, review the code till the patch has not grown too much :)
11 years ago (2009-11-25 12:01:30 UTC) #1
Maxim.Mossienko
Continuing extraction of static data - static data of v8::internal::Top moved to v8::internal::TopData, static data ...
11 years ago (2009-11-27 19:21:02 UTC) #2
Maxim.Mossienko
- All mutable statics of v8::internal::MemoryAllocator become instance data of v8::internal::MemoryAllocatorData - All mutable statics ...
11 years ago (2009-11-30 12:30:51 UTC) #3
Maxim.Mossienko
- No more preprocessor directive SEVERAL_V8_IN_PROCESS needed, just static declaration like AllowSeveralV8InstancesInProcess v8_please; switches support ...
11 years ago (2009-11-30 20:02:40 UTC) #4
Maxim.Mossienko
- Extensions processed in bootstrapper with v8shareddata lock if needed - Counters class instance become ...
11 years ago (2009-12-03 20:09:08 UTC) #5
Maxim.Mossienko
- Statics of Logger and Log class moved to LoggerData/LogData - Put all changes to ...
11 years ago (2009-12-04 19:16:27 UTC) #6
Maxim.Mossienko
- Handled shared data for Assembler on 64bit / Arm cpu - Proper locking for ...
11 years ago (2009-12-08 17:15:43 UTC) #7
Bahaa Naamneh
1. allocation.h: "static int allocation_disallowed_;" should be removed from NativeAllocationChecker class. 2. heap.h: a new ...
10 years, 11 months ago (2010-01-13 13:14:10 UTC) #8
Bahaa Naamneh
10 years, 11 months ago (2010-01-13 16:41:38 UTC) #9
You have many memory leaks in your code, examples:
1. DebuggerData::DebuggerData():debugger_access_(OS::CreateMutex()),
2. TopData::TopData():break_access_(OS::CreateMutex()),
3. ThreadManagerData::ThreadManagerData():mutex_(OS::CreateMutex()),

Mutex* OS::CreateMutex() {
  return new LinuxMutex();
}

You didn't release the allocated mutex objects.

In the original code of V8 these variables were static, and as of that they
haven't released them explicitly since the operating system will do so
when the process is terminated, but here in our case we have to release every
dynamic allocated memory explicitly.

Regards,
Bahaa

On 2010/01/13 13:14:10, Bahaa Naamneh wrote:
> 1. allocation.h:
>   "static int allocation_disallowed_;" 
>   should be removed from  NativeAllocationChecker class.
> 		
> 2. heap.h:
>   a new class named ExternalStringTable has been added which contains
>   2 static data members:
>     static List<Object*> new_space_strings_;
>     static List<Object*> old_space_strings_;
>   		
> 3. spaces.h:
>   "static RSetState rset_state_;" should be removed form Page class.
> 		
> 4. bootstrapper.cc:
>   a new static variable: 
>     List<char*>* delete_these_arrays_on_tear_down_;
> 		
> 5. In AssemblerData, the data member spare_buffer_ should be release 
>    by calling "DeleteArray" and not "delete" since it is allocated 
>    by NewArray:
>     ~AssemblerData() { DeleteArray(spare_buffer_); }
> 		
> 6. Where do you release the allocated dynamic memory in: ?
>    Counters::Counters()
>     : state_counters(new StatsCounter[state_counters_count]) { 
>   
>    You should add a destructor for Counters class to deallocated 
>    the memory.
>   
> 7. The order of the member variables in your added classes do not 
>    match with the order they are written in the initialisation list in 
>    the constructor, 
>    and that cause the compilation under gcc to fail. you should 
>    reorder your initialisation lists or add '-Wno-reorder' flag to gcc 
>    compilation flags.
> 	 
> 
> 8. Note: a call to V8::Dispose() should be called explicitly at the 
>    end if each thread that creates an V8 instance to deallocate all 
>    the used memory.
> 
> 
> 9. There are some memory-leaks in V8 code which we have to take care 
>    of:
>     
> http://groups.google.com/group/v8-users/browse_thread/thread/04347322e009198c#
>    The one discussed in the link above is a minor memory leak indeed 
>    but with a heavily used threads application it might be a problem.
> 	 
> 10. Valgrind reported the following memory leaks:
> 60 bytes in 5 blocks are definitely lost in loss record 3 of 17
>    at 0x1B903EB2: operator new(unsigned) (vg_replace_malloc.c:133)
>    by 0x81C4EC6: v8::internal::CodeGeneratorData::result_constants_list()
> (codegen.cc:70)
>    by 0x8153134: v8::internal::Result::ConstantList()
(register-allocator.cc:48)
>    by 0x80778FA: v8::internal::Result::ClearConstantList()
> (register-allocator.h:99)
>    by 0x80774B8: v8::internal::CompilationZoneScope::~CompilationZoneScope()
> (compiler.h:127)
>    by 0x8073879: v8::internal::ScanMakeFunction(bool, bool,
> v8::internal::Compiler::ValidationState,
> v8::internal::Handle<v8::internal::Script>,
> v8::internal::Handle<v8::internal::Context>, v8::Extension*,
> v8::internal::ScriptDataImpl*) (compiler.cc:313)
>    by 0x8073D10:
>
v8::internal::Compiler::ScanCompile(v8::internal::Handle<v8::internal::String>,
> v8::internal::Handle<v8::internal::Object>, int, int, v8::Extension*,
> v8::internal::ScriptDataImpl*) (compiler.cc:409)
>    by 0x804EDC7: v8::Script::ScanNew(v8::Handle<v8::String>,
v8::ScriptOrigin*,
> v8::ScriptData*) (api.cc:1273)
> 
> 
> 60 bytes in 5 blocks are definitely lost in loss record 4 of 17
>    at 0x1B903EB2: operator new(unsigned) (vg_replace_malloc.c:133)
>    by 0x81C4F04:
v8::internal::CodeGeneratorData::frame_element_constants_list()
> (codegen.cc:76)
>    by 0x80965F4: v8::internal::FrameElement::ConstantList()
> (frame-element.cc:40)
>    by 0x807791A: v8::internal::FrameElement::ClearConstantList()
> (frame-element.h:98)
>    by 0x80774B3: v8::internal::CompilationZoneScope::~CompilationZoneScope()
> (compiler.h:126)
>    by 0x8073879: v8::internal::ScanMakeFunction(bool, bool,
> v8::internal::Compiler::ValidationState,
> v8::internal::Handle<v8::internal::Script>,
> v8::internal::Handle<v8::internal::Context>, v8::Extension*,
> v8::internal::ScriptDataImpl*) (compiler.cc:313)
>    by 0x8073D10:
>
v8::internal::Compiler::ScanCompile(v8::internal::Handle<v8::internal::String>,
> v8::internal::Handle<v8::internal::Object>, int, int, v8::Extension*,
> v8::internal::ScriptDataImpl*) (compiler.cc:409)
>    by 0x804EDC7: v8::Script::ScanNew(v8::Handle<v8::String>,
v8::ScriptOrigin*,
> v8::ScriptData*) (api.cc:1273)
> 
> 
> 120 bytes in 6 blocks are definitely lost in loss record 6 of 17
>    at 0x1B903EB2: operator new(unsigned) (vg_replace_malloc.c:133)
>    by 0x81514C4: v8::internal::OS::CreateSemaphore(int)
(platform-linux.cc:640)
>    by 0x807E229: v8::internal::DebuggerData::DebuggerData() (debug.cc:1804)
>    by 0x81B652F: v8::internal::V8Context::V8Context()
(v8-global-context.cc:117)
>    by 0x81B7050: __static_initialization_and_destruction_0(int, int)
> (v8-global-context.cc:29)
>    by 0x81B7118: _GLOBAL__I__ZN2v87tls_keyE (objects.h:1939)
> 
> 
> 300 bytes in 5 blocks are definitely lost in loss record 10 of 17
>    at 0x1B903EB2: operator new(unsigned) (vg_replace_malloc.c:133)
>    by 0x81F9A19: v8::internal::ExternalReferenceTable::instance()
> (serialize.cc:158)
>    by 0x81F67DD:
> v8::internal::ExternalReferenceDecoder::ExternalReferenceDecoder()
> (serialize.cc:560)
>    by 0x81F6E03: v8::internal::Deserializer::Deserialize() (serialize.cc:669)
>    by 0x81B77D2: v8::internal::V8::Initialize(v8::internal::Deserializer*)
> (v8.cc:107)
>    by 0x819D3AB: v8::internal::Snapshot::Deserialize(unsigned char const*,
int)
> (snapshot-common.cc:43)
>    by 0x819D441: v8::internal::Snapshot::Initialize(char const*)
> (snapshot-common.cc:56)
>    by 0x80551E7: v8::V8::Initialize() (api.cc:2737)
> 
> 
> 504 bytes in 18 blocks are definitely lost in loss record 12 of 17
>    at 0x1B903EB2: operator new(unsigned) (vg_replace_malloc.c:133)
>    by 0x81512F4: v8::internal::OS::CreateMutex() (platform-linux.cc:570)
>    by 0x81B840D: v8::internal::ThreadManagerData::ThreadManagerData()
> (v8threads.cc:275)
>    by 0x81B605F: v8::internal::V8Context::V8Context()
(v8-global-context.cc:117)
>    by 0x81B7050: __static_initialization_and_destruction_0(int, int)
> (v8-global-context.cc:29)
> 
> 
> 81904 bytes in 1 blocks are possibly lost in loss record 16 of 17
>    at 0x1B903D38: malloc (vg_replace_malloc.c:131)
>    by 0x81BD241: v8::internal::Malloced::New(unsigned) (allocation.cc:38)
>    by 0x8081CA6: v8::internal::Malloced::operator new(unsigned)
> (allocation.h:40)
>    by 0x809B4E0: v8::internal::GlobalHandles::Pool::Pool()
> (global-handles.cc:219)
>    by 0x809B456:
> v8::internal::GlobalHandlesPrivateData::GlobalHandlesPrivateData()
> (global-handles.cc:450)
>    by 0x809A426: v8::internal::GlobalHandlesData::GlobalHandlesData()
> (global-handles.cc:450)
>    by 0x81B61F9: v8::internal::V8Context::V8Context()
(v8-global-context.cc:117)
>    by 0x81B7050: __static_initialization_and_destruction_0(int, int)
> (v8-global-context.cc:29)
> 
> 
> 82180 bytes in 5 blocks are definitely lost in loss record 17 of 17
>    at 0x1B903D38: malloc (vg_replace_malloc.c:131)
>    by 0x81BD241: v8::internal::Malloced::New(unsigned) (allocation.cc:38)
>    by 0x81BB33C: v8::internal::Segment::New(int) (zone.cc:70)
>    by 0x81BB00D: v8::internal::Zone::NewExpand(int) (zone.cc:182)
>    by 0x8077CE2: v8::internal::Zone::New(int) (zone-inl.h:48)
>    by 0x80E3D94: v8::internal::ZoneObject::operator new(unsigned) (zone.h:142)
>    by 0x819A800:
> v8::internal::Scope::NewUnresolved(v8::internal::Handle<v8::internal::String>,
> bool) (scopes.cc:255)
>    by 0x8144D7A: v8::internal::Parser::ParsePrimaryExpression(bool*)
> (parser.cc:3193)
> 
> 
> please take a look at them.
> 
> 
> 
> There are still some minor things which I do not remember and didn't write
them
> down since I wasn't focused on reviewing your code, but I was using your code
as
> a reference during changing V8's code into thread-safe code.

Powered by Google App Engine
This is Rietveld 408576698