Commit Graph

335 Commits

Author SHA1 Message Date
loislo@chromium.org
1a15f8f768 CPUProfiler: Simplify logging part of CreateCodeEvent functions.
We have 5 overloaded functions with name CreateCodeEvent.
All these functions have many common parts. I'd like to eliminate the difference between them.

TEST=existing tests
R=yangguo@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15287 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 12:55:19 +00:00
loislo@chromium.org
9d95db6fad CPUProfiler: remove copy&paste from CodeCreateEvent.
This is the next patch on the way of simplifying profiler API.
It is extracting the common parts of the serialization process.

TEST=current test set
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15276 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 08:40:38 +00:00
loislo@chromium.org
2f811dbb99 Revert "DevTools: CPUProfiler: provide url for scripts that have sourceURL property."
This reverts commit d95b7bb92ad1a191cf505250830d094b86d61e8f.
This reverts commit ca81c09a367600be79452e1fc53ac63b75e369c4.

record-cpu-profile.html is crashing

TBR= yurys@chromium.org, danno@chromium.org
BUG=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 11:09:19 +00:00
dcarney@chromium.org
8b2c26d736 remove most uses of raw handle constructors
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 09:27:09 +00:00
loislo@chromium.org
29abaf4aad DevTools: CPUProfiler: provide url for scripts that have sourceURL property.
BUG=none
TEST=SourceURLSupportForNewFunctions, LogExistingFunctionSourceURLCheck
R=jkummerow@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-12 08:27:24 +00:00
yangguo@chromium.org
7f8a3d803c Make assertion scopes thread safe.
R=svenpanne@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/15691017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 15:32:22 +00:00
yurys@chromium.org
880934b1a8 Remove unnecessary check from Logger::LogCodeObject
Logger::LogCodeObjects is the only caller of the method. And all its
call sites check for at least one of the coditions before calling
LogCodeObjects. So there is no need to check it again.

BUG=None
R=jkummerow@chromium.org, loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 09:46:32 +00:00
yurys@chromium.org
69c2f54d32 Skip samples where top function's stack frame is not setup properly
Stack iterator takes return address based on the frame pointer (ebp) and detects JS frames based on value at fp + StandardFrameConstants::kMarkerOffset. So in order the iterator to work correctly this values should be already setup for the current function. Stack frame is constructed at the very beginning of JS function code and destroyed before return. If sample is taken before before the frame construction is completed or after it was destroyed the stack iterator will wrongly think that FP points at the current functions frame base and will skip callers frame. To avoid this we mark code ranges where  stack frame doesn't exist and completely ignore such samples.

This fixes cctest/test-cpu-profiler/CollectCpuProfile flakiness.

BUG=v8:2628
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-14 22:51:33 +00:00
dcarney@chromium.org
0a32b57594 HasOnlyAsciiChars can return incorrect results. Fixup usages and rename.
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 11:34:44 +00:00
yangguo@chromium.org
d1df0e631d Clean up VMState a little bit.
R=svenpanne@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/14139033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 14:44:08 +00:00
danno@chromium.org
f8ddf3a262 Add monomorphic CompareNilICs and Crankshaft support
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-24 11:32:17 +00:00
yurys@chromium.org
c0fca4e8c8 Revert r14252 as it broke --prof for some cases
R=jkummerow
BUG=v8:2642

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 11:55:01 +00:00
danno@chromium.org
244fa50a80 Make it possible to Crankshaft all kinds of stubs.
Review URL: https://codereview.chromium.org/14307006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 09:50:46 +00:00
yurys@chromium.org
f4e563d391 Move StackTracer to sampler.h
Apart from tests Sampler is the only client of StackTracer so it is logical to move it into sampler.h

BUG=None

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-17 07:53:12 +00:00
yurys@chromium.org
99a0dabbaf Nuke SamplerRegistry
The registry is a simple list of active Samplers but uses additional Mutex. Useful parts were merged into SamplerThread, others removed completely.

BUG=None

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14297 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-17 07:20:24 +00:00
jkummerow@chromium.org
586c4e74b6 Replace OS::MemCopy with OS::MemMove (just as fast but more flexible).
Review URL: https://codereview.chromium.org/13932006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14280 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 12:30:51 +00:00
yurys@chromium.org
1596afa7f9 Move *BSD and Solaris Sampler implementation into sampler.cc
This is a first step to having profiler sampler implementation in one file with platform capabilities guarded with #ifdef. Otherwise we have very similar implementations scattered over platform-*.cc files which makes it hard to see differences and make changes.

The next steps will be to merge win32, Mac OS X and Cygwin implementations into sampler.cc They suspend profiled thread instead of sending a signal but apart from that the logic is pretty much the same. Then I'm going to move sampler-related code from log.* into sampler.*

BUG=None

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-15 13:57:41 +00:00
yurys@chromium.org
5206b08451 Remove code that analyzes tos values from tickprocessor
Assuming that the value on top of stack is return address for a frameless invocation is error-prone. Corresponding logic was removed from profile-generator.cc in r14205 (see https://code.google.com/p/v8/source/diff?spec=svn14205&r=14205&format=side&path=/branches/bleeding_edge/src/profile-generator.cc) and now it is time to remove it from the tick processor.

Since the tos is not used anymore by profiler it is also removed from TickSample.

BUG=None

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-12 11:20:22 +00:00
yurys@chromium.org
3b65ecccf0 Remove LOGGER macro
Use already saved isolate pointer and avoid TLS lookup when
retrieving Logger instance

BUG=None

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14168 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-08 15:16:55 +00:00
yurys@chromium.org
b293d4d4a2 No need to start Ticker for Crankshaft
Crankshaft doesn't depend on the sampler thread any more. No
need to start the that thread for Crankshaft.

BUG=v8:2609

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-08 15:09:03 +00:00
yurys@chromium.org
9cbb34a0b5 Isolatify CPU profiler
Relanding r13987 that was reverted in r14031

TBR=danno
BUG=None

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 07:53:50 +00:00
rossberg@chromium.org
2657e432e4 ES6 symbols: implement name property
Adds string-valued name property to symbols, and uses it for pretty-printing.

Requires allocating symbols in pointer space, with a custom iterator to skip the unboxed hash.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-22 16:51:28 +00:00
danno@chromium.org
ed3809c318 Maintain API compatibility with older versions of V8.
Revert "Allow recording individual samples in addition to the aggregated CPU profiles"
Revert "Isolatify CPU profiler"
Revert "Isolatify HeapProfiler"
Revert "Deprecate HeapSnapshot type"
Revert "Isolatify CPU profiler public API"
Revert "MSVS compilation fix after r14006"
Revert "Add methods to allow resuming execution after calling TerminateExecution()."

R=jkummerow@chromium.org,mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-21 14:42:17 +00:00
yurys@chromium.org
a8e9bebabd Isolatify CPU profiler
BUG=None

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-19 12:44:10 +00:00
svenpanne@chromium.org
e4e4447305 Pass Isolates explicitly in Deoptimizer-related code.
Removed a few ancient useless ASSERTs on the way. Reduced the number of train wrecks.

BUG=v8:2487

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-18 13:57:49 +00:00
rossberg@chromium.org
5c93b18eb2 ES6 symbols: Allow symbols as property names
Since symbols and strings share a common representation, most of this change is about consistently replacing 'String' with 'Name' in all places where property names are expected. In particular, no new logic at all is necessary for maps, property dictionaries, or transitions. :) The only places where an actual case distinction is needed have to do with generated type checks, and with conversions of names to strings (especially in logger and profiler).

Left in some TODOs wrt to the API: interceptors and native getters don't accept symbols as property names yet, because that would require extending the external v8.h.

(Baseline CL: https://codereview.chromium.org/12296026/)

R=verwaest@chromium.org,mstarzinger@chromium.org
BUG=v8:2158

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 15:00:57 +00:00
danno@chromium.org
be8e8f7528 Improve the JitCodeEventHandler API to add support for line position information.
This includes:

* adding the CODE_ADD_LINE_POS_INFO, CODE_START_LINE_INFO_RECORDING, CODE_END_LINE_INFO_RECORDING event and the corresponding functionality.
 * adding the JITCodeLineInfo struct to record the code line info. I added this definition because Danno mentioned that "we'd like to cleanup and decouple the external debugging functionality"
 * some other small changes.

Review URL: https://chromiumcodereview.appspot.com/12223027
Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-18 18:06:12 +00:00
svenpanne@chromium.org
71a26c928a Make the Isolate parameter mandatory for internal HandleScopes.
Improved Frames and their iterators on the way, too.

BUG=v8:2487

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-15 09:27:10 +00:00
dcarney@chromium.org
0da6e525b7 Split AccessorInfo into DeclaredAccessorInfo and ExecutableAccessorInfo
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-12 14:33:08 +00:00
svenpanne@chromium.org
7b45ab9501 Don't use TLS for space iterators.
This is not only inherently slow, but it also forces the caller to enter an
Isolate before. Both is bad, so we have to do some heap plumbing.

BUG=v8:2531

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-11 13:02:20 +00:00
mstarzinger@chromium.org
9cec21e60c profiler: log solib addresses unconditionally
Make --prof_lazy log the addresses of shared libraries. Without those addresses,
the output of the tick processor is not very useful for node.js applications.

Address logging was disabled for --prof-lazy in r3154 for reasons that no longer
apply: the profiler is started on demand and hence looking up the addresses is
deferred until it's actually necessary.

Review URL: https://codereview.chromium.org/11309007
Patch from Ben Noordhuis <info@bnoordhuis.nl>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-29 14:39:09 +00:00
yangguo@chromium.org
048b86d697 Log event start and event end separately when using --log-timer-events.
R=haraken@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/12040075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-28 13:55:40 +00:00
yangguo@chromium.org
e41c17084f Continues Latin-1 support. All tests pass with ENABLE_LATIN_1 flag.
R=yangguo@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11818025
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-09 15:47:53 +00:00
yangguo@chromium.org
45f20e366a Introduce ENABLE_LATIN_1 compile flag
Mostly a bunch of renaming when flag is disabled.

R=yangguo@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11759008
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-09 10:30:54 +00:00
danno@chromium.org
1f4b4625ff Re-land Crankshaft-generated KeyedLoad stubs.
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11528003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-18 16:25:45 +00:00
danno@chromium.org
64fc1f99cb Revert 13157, 13145 and 13140: Crankshaft code stubs.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-10 11:09:12 +00:00
svenpanne@chromium.org
608bce5023 Remove SlidingStateWindow and related code.
Review URL: https://codereview.chromium.org/11441034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-07 13:47:42 +00:00
yangguo@chromium.org
424a492dde Take instrumentation overhead into account when plotting.
R=jkummerow@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11348298

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-05 16:22:14 +00:00
danno@chromium.org
f19959cd22 Enable stub generation using Hydrogen/Lithium (again)
This initial implementation generates only KeyedLoadICs using the new Hydrogen stub infrastructure.

Committed: https://code.google.com/p/v8/source/detail?r=13105

Committed: https://code.google.com/p/v8/source/detail?r=13117

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-05 11:04:10 +00:00
danno@chromium.org
66f6a8182c Revert 13117: "Enable stub generation using Hydrogen/Lithium (again)"
TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-03 17:16:51 +00:00
danno@chromium.org
78b09625d5 Enable stub generation using Hydrogen/Lithium (again)
This initial implementation generates only KeyedLoadICs using the new Hydrogen stub infrastructure.

Committed: https://code.google.com/p/v8/source/detail?r=13105

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-03 15:51:05 +00:00
danno@chromium.org
0a3bcc8c05 Revert 13105: "Enable stub generation using Hydrogen/Lithium."
TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-30 17:45:45 +00:00
danno@chromium.org
c115ff4e33 Enable stub generation using Hydrogen/Lithium.
This initial implementation generates only KeyedLoadICs using the new Hydrogen stub infrastructure.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-30 17:31:30 +00:00
yangguo@chromium.org
432be2c8fd Also time external callbacks from generated code.
R=jkummerow@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11411224

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-28 15:11:21 +00:00
yangguo@chromium.org
028f85a244 Include more information in --prof log.
Main changes:
- include timestamps in profile ticks
- include code kind in code create events
- time execution in external code
- changed plot-timer-events.js to show the code kind being executed

R=jkummerow@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11428025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-28 11:01:10 +00:00
yangguo@chromium.org
94476cb89a Also time other API functions calling into javascript.
And prevent crash when starting chromium without --single-process.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11411144

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-26 08:56:59 +00:00
yangguo@chromium.org
72db2287c3 Add parallel recompilation time to histogram and plot execution pause times.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11412125

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-22 13:04:11 +00:00
jkummerow@chromium.org
f9d4856289 Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as profilers.
BUG=None
TEST=Included in CL.

Committed: https://code.google.com/p/v8/source/detail?r=12389

Review URL: https://chromiumcodereview.appspot.com/10795074
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-28 14:43:28 +00:00
verwaest@chromium.org
a713f82aa6 Revert "Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as profilers."
This reverts commit r12389.

TBR=jkummerow@chromium.org, CC=siggi@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10870108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 19:47:02 +00:00
jkummerow@chromium.org
0a6493b5a8 Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as profilers.
BUG=None
TEST=Included in CL.

Review URL: https://chromiumcodereview.appspot.com/10795074
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 18:03:38 +00:00
vegorov@chromium.org
1a6cd523c8 Introduce DISABLE_ASAN macro to disable AddressSanitizer instrumentation for given functions.
Disable AddressSanitizer instrumentation for StackTracer::Trace.

R=danno@chromium.org
BUG=chromium:134722

Review URL: https://chromiumcodereview.appspot.com/10834430

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-21 14:21:53 +00:00
danno@chromium.org
db86043160 Minimize uses of lazy initialization by adding explicit initialization functions.
BUG=118686

Review URL: https://chromiumcodereview.appspot.com/9976003
Patch from Philippe Liard <pliard@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-05 14:10:39 +00:00
fschneider@chromium.org
1f7d42efc9 Landing for pliard@chromium.org: Remove static initializers in v8.
This change includes two CLs by pliard@chromium.org:

1. http://codereview.chromium.org/9447052/ (Add CallOnce() and simple LazyInstance implementation):

Note that this implementation of LazyInstance does not handle global destructors (i.e. the lazy instances are never deleted).

This CL was initially reviewed on codereview.appspot.com:
http://codereview.appspot.com/5687064/



2.  http://codereview.chromium.org/9455088/ (Remove static initializers in v8):
This CL depends on CL 9447052 (adding CallOnce and LazyInstance).
It is based on a patch sent by Digit.

With this patch applied, we have only one static initializer left (in atomicops_internals_x86_gcc.cc). This static initializer populates a structure used by x86 atomic operations. It seems that we can hardly remove it. If possible, it will be removed in a next CL. 

This CL also modifies the presubmit script to check the number of static initializers.


BUG=v8:1859
Review URL: https://chromiumcodereview.appspot.com/9666052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-12 13:56:56 +00:00
erik.corry@gmail.com
03cfc4363b Fix input and output to handle UTF16 surrogate pairs.
Review URL: https://chromiumcodereview.appspot.com/9600009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-12 12:35:28 +00:00
vegorov@chromium.org
a7b0481b6d Tweak compaction candidate selection to avoid keeping page with low occupancy around.
Increase slots buffer chain length to 15 to make compaction more aggressive and usefull.

Pass gc and collector selection reasons to GCTracer to allow more meaningull --gc-trace.

Print fragmentation of spaces that we do not compact.

R=erik.corry@gmail.com

Review URL: https://chromiumcodereview.appspot.com/9323007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-03 14:16:40 +00:00
erik.corry@gmail.com
b3e0761e38 Cosmetic changes ("set up" is a verb, "setup" is a noun).
Review URL: http://codereview.chromium.org/9139051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-13 13:09:52 +00:00
vitalyr@chromium.org
8a074ba183 MIPS: Enable the ll_prof profiler on MIPS.
BUG=
TEST=

Review URL: http://codereview.chromium.org/8509006
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 18:36:31 +00:00
mikhail.naganov@gmail.com
0b2f694d99 Make sure that heap is iterable prior to iterating it in Logger:: methods.
R=vegorov@chromium.org
BUG=v8:1700
TEST=none

Review URL: http://codereview.chromium.org/8079002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-29 15:07:00 +00:00
vegorov@chromium.org
ac36cb4504 Merge experimental/gc branch to the bleeding_edge.
Review URL: http://codereview.chromium.org/7945009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 18:36:47 +00:00
mikhail.naganov@gmail.com
b706cfce94 Eliminate the need for code delete events in CPU profiler.
Events are still generated for tick processor on performance testing
server to work, as soon as scripts will be updated, it will be safe
to remove code delete events emitting code.

R=erik.corry@gmail.com
BUG=v8:1466
TEST=existing tests in test-profile-generator,test-cpu-profiler and mjsunit/tools

Review URL: http://codereview.chromium.org/7864017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-14 11:47:03 +00:00
mikhail.naganov@gmail.com
f8e5c71e18 Rename SmartPointer to SmartArrayPointer.
As pointed out in: http://codereview.chromium.org/7754007/#msg5

"SmartPointer should have been named SmartArrayPointer as it expects an input
allocated using new[] and deallocates it using delete[]. Using it as a simple
scoped pointer for a single object is incorrect."

R=mnaganov@chromium.org

Review URL: http://codereview.chromium.org/7860011
Patch from Thiago Farina <tfarina@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-09 22:39:47 +00:00
svenpanne@chromium.org
f7138b1427 Implement a type recording ToBoolean IC.
The IC records the set of types it has seen, e.g. {String} or {Boolean,
Undefined}, etc.  Note that in theory this could lead to a large number of
different ToBoolean ICs (512, to be exact, because we distinguish 9 types),
but in practice only a small handful of them are actually generated.

Currently the type recording part is only implemented on ia32, other platforms
continue to work like they did before, though.

Removed some dead code on the way.
Review URL: http://codereview.chromium.org/7473028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-21 13:51:04 +00:00
mikhail.naganov@gmail.com
5c57d0d643 Remove support for logging into a memory buffer.
The only usage of it was in logging tests, I've switched them for
using a file.

I've left out support for "--logfile=*" for now, as Chromium uses it.
Will be removed after the next V8 roll.

R=sgjesse@chromium.org
BUG=859
TEST=mjsunit/log-*

Review URL: http://codereview.chromium.org/7310025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:31:22 +00:00
sgjesse@chromium.org
8a6108de95 Remove the ability to compile without logging and profiling
The preprocessor defines ENABLE_LOGGING_AND_PROFILING and ENABLE_VMSTATE_TRACKING has been removed as these where required to be turned on for Crankshaft to work. To re-enable reducing the binary size by leaving out heap and CPU profiler a new set of defines needs to be created.

R=ager@chromium.org

BUG=v8:1271
TEST=all

Review URL: http://codereview.chromium.org//7350014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 09:09:04 +00:00
mikhail.naganov@gmail.com
33177880c8 Remove "modules" and "tags" of the logging CPU profiler.
Modules now makes a little sense, as there is only one module.
Tags was a simplistic attempt of supporting nested profiles.

R=sgjesse@chromium.org
BUG=859

Review URL: http://codereview.chromium.org/7276046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 09:35:16 +00:00
mikhail.naganov@gmail.com
f4bf8f8fee Remove obsolete aggregating and non-working producers heap profilers.
2000 LOC are gone!

R=sgjesse@chromium.org
BUG=1481

Review URL: http://codereview.chromium.org/7247018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-24 11:38:47 +00:00
mikhail.naganov@gmail.com
0416b2edc4 Prevent a NULL deref.
Patch by Rachel Blum <groby@chromium.org>

R=mnaganov@chromium.org

Review URL: http://codereview.chromium.org/7218036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-22 20:41:02 +00:00
mikhail.naganov@gmail.com
650df48c55 Cleanup extra initialization of TickSample fields.
R=vitalyr@chromium.org
BUG=1293

Review URL: http://codereview.chromium.org/7203005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-22 13:54:35 +00:00
mikhail.naganov@gmail.com
973fca1689 Fix issue 1417: check for script source availability when enumerating optimized functions.
R=kasperl@chromium.org,kmillikin@chromium.org
BUG=1417
TEST=test-log/Issue23768

Review URL: http://codereview.chromium.org/7184027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-17 08:40:30 +00:00
mikhail.naganov@gmail.com
508b22c436 "Deiceolate" Thread classes.
Thread class was receiving an isolate parameter by default.
This approact violates the assumption that only VM threads
can have an associated isolate, and can lead to troubles,
because accessing the same isolate from different threads
leads to race conditions.

This was found by investigating mysterious failures of the
CPU profiler layout test on Linux Chromium. As almost all
threads were associated with some isolate, the sampler was
trying to sample them.

As a side effect, we have also fixed the DebuggerAgent test.

Thanks to Vitaly for help in fixing isolates handling!

R=vitalyr@chromium.org
BUG=none
TEST=none

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:54:04 +00:00
mikhail.naganov@gmail.com
47248cc5fe Revert accidental r8254..r8256
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:42:08 +00:00
mikhail.naganov@gmail.com
f05fd92994 remove isolate reference from threads
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8254 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:35:31 +00:00
sgjesse@chromium.org
e497896181 Fix building with profilingsupport=off
Using profilingsupport=off is not recommended as it will turn off crankshaft. With this change it will build though.

R=erik.corry@gmail.com

BUG=none
TEST=none

Review URL: http://codereview.chromium.org//7085025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 14:33:23 +00:00
fschneider@chromium.org
5552dbccdd Rename TypeRecording...Stub into ...Stub.
There is no need for this long name.
Review URL: http://codereview.chromium.org/7063017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 12:20:16 +00:00
vitalyr@chromium.org
36195e73a7 ll_prof: Add function optimization status markers.
Review URL: http://codereview.chromium.org/7056012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7970 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-20 15:45:06 +00:00
danno@chromium.org
123500999f Reland 7917:
Better support for 'polymorphic' JS and external arrays

Allow  keyed store/load stubs to switch between external array and fast JS arrays without forcing a state transition to the generic stub.

There CL consists of two pieces of functionality. First, code stubs for fast element arrays don't immediately transition to the MEGAMORPHIC state when there's a map mismatch. Second, two ICs are cached per map for fast elements, the MONOMORPHIC version, and a new MEGAMORPHIC version that handles two or more different maps and dispatches to shared stubs to perform the array operation.

Review URL: http://codereview.chromium.org/7036016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 13:17:29 +00:00
danno@chromium.org
83c84a43e8 Revert 7917
TBR=danno@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 18:47:10 +00:00
danno@chromium.org
5a9b2b3c5f Better support for 'polymorphic' JS and external arrays
Allow  keyed store/load stubs to switch between external array and fast JS arrays without forcing a state transition to the generic stub.

There CL consists of two pieces of functionality. First, code stubs for fast element arrays don't immediately transition to the MEGAMORPHIC state when there's a map mismatch. Second, two ICs are cached per map for fast elements, the MONOMORPHIC version, and a new MEGAMORPHIC version that handles two or more different maps. Currently, the only array types supported by the MEGAMORPHIC stub are fast elements for objects and JSArrays.

BUG=
TEST=

Review URL: http://codereview.chromium.org/6894003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 17:29:13 +00:00
vitalyr@chromium.org
9af0a4e4a3 Fix windows build.
TBR=mnaganov@chromium.org

Review URL: http://codereview.chromium.org/6901125

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 16:26:37 +00:00
vitalyr@chromium.org
a9ea3f98b0 ll_prof: Reduce profiling hooks overhead from >400% to 25%.
Switched to using binary low-level log instead of the textual log used
by the ticks processor. The binary log contains code-related events,
code object names, and their bodies. When writing to the log we ask
glibc to use a larger buffer. To avoid complex processing of the
snapshot log (which is still textual) the serializer emits final
snapshot position to code name mappings that can be quickly be read
without replaying the snapshot log. (This might be useful for the
ticks processor.)

Review URL: http://codereview.chromium.org/6904127

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 16:06:25 +00:00
svenpanne@chromium.org
e013d4f0a4 Type recording for unary ops
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 17:49:55 +00:00
fschneider@chromium.org
544a436425 Remove code from the deprecated GenericBinaryOpStub.
All platforms are now using the TypeRecordingBinaryOpStub.

I also removed the ARM IntegerModStub which was called from
the GenericBinaryOpStub.
Review URL: http://codereview.chromium.org/6826032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 09:39:21 +00:00
mikhail.naganov@gmail.com
c9904976f9 Simplify isolates access during stack iteration (WAS: Move SafeStackFrameIterator::active_count_...)
While trying to fix Mac and Windows versions for this change:
http://codereview.chromium.org/6771047/, I figured out, that we
already store an isolate in StackFrameIterator, so we can use it in
frame objects, instead of requiring it from caller.

I've changed iterators usage to the following scheme: whenever a
caller maintains an isolate pointer, it just passes it to stack
iterator, and no more worries about passing it to frame content
accessors.  If a caller uses current isolate, it can omit passing it
to iterator, in this case, an iterator will use the current isolate,
too.

There was a special case with LiveEdit, which creates
detached copies of frame objects.

R=vitalyr@chromium.org
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6794019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-05 09:01:47 +00:00
mikhail.naganov@gmail.com
a8af96990b Add initialization for has_external_callback field.
It looks like we initialize TickSample values twice in some
situations, but I will fix this in a separate change list.

R=sgjesse@chromium.org
BUG=1292
TEST=none

Review URL: http://codereview.chromium.org/6756031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-30 13:30:52 +00:00
mikhail.naganov@gmail.com
b3cec2be9f Remove an extra comma from "tick" log records.
This fixes VM state fetching from "tick" log records.

TBR=vitalyr@chromium.org
BUG=1287
TEST=none

Review URL: http://codereview.chromium.org/6718041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-29 09:18:08 +00:00
vitalyr@chromium.org
1ae2ea08b9 Remove more TLS hurting Dromaeo DOM.
Patch by Dmitry Lomov.

Review URL: http://codereview.chromium.org/6745029


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-28 08:44:30 +00:00
ager@chromium.org
1bdc8031fa Introduce accessors on builtins instance and use them to avoid TLS access when getting builtins.
R=vitalyr@chromium.org

Review URL: http://codereview.chromium.org/6717018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-23 13:40:07 +00:00
ager@chromium.org
4f5de28a9b Avoid TLS access for counters.
Get rid of the COUNTERS macro and fetch the counters from a locally
stored isolate instead.

R=karlklose@chromium.org

Review URL: http://codereview.chromium.org/6723014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-23 11:13:07 +00:00
mikhail.naganov@gmail.com
cbbe713464 Change the way sampler / profiler handle external callbacks.
This should fix test-profile-generator/RecordStackTraceAtStartProfiling flakinness.

R=vitalyr@chromium.org
BUG=1261
TEST=test-profile-generator/RecordStackTraceAtStartProfiling

Review URL: http://codereview.chromium.org/6708056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7294 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-21 18:13:27 +00:00
vitalyr@chromium.org
7976ca2cbc Merge isolates to bleeding_edge.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 20:35:07 +00:00
vitalyr@chromium.org
76e226f832 Revert r7268: it borked the history.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 19:41:05 +00:00
vitalyr@chromium.org
6ff7fdebd3 Merge isolates to bleeding_edge.
Review URL: http://codereview.chromium.org/6685088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 18:49:56 +00:00
mikhail.naganov@gmail.com
943e4f8340 Remove `sfi' abbreviations (a follow-up to r6902).
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6646022/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-10 12:00:27 +00:00
mikhail.naganov@gmail.com
6eb8c9e5a0 Revert r7119..r7121
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7123 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-10 11:55:03 +00:00
mikhail.naganov@gmail.com
47a5723704 comment
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-10 11:49:07 +00:00
mikhail.naganov@gmail.com
c6d2bb18aa renamed
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-10 11:48:56 +00:00
danno@chromium.org
9cca7d2733 Combine typed and pixel arrays.
Worth mentioning:
- Specialized versions of pixel array and store/loads inside the generic stubs have been removed, since to have parity for all external arrays, 8 different versions would have to be inlined/checked.
- There's a new constant in v8.h for external arrays with pixel array elements.

Review URL: http://codereview.chromium.org/6546036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-09 15:01:16 +00:00
mikhail.naganov@gmail.com
56788625b6 Fix CPU profiling for Crankshaft.
The main issue was due to multiple recompilations of functions.  Now
code objects are grouped by function using SFI object address.
JSFunction objects are no longer tracked, instead we track SFI object
moves. To pick a correct code version, we now sample return addresses
instead of JSFunction addresses.

tools/{linux|mac|windows}-tickprocessor scripts differentiate
between code optimization states for the same function
(using * and ~ prefixes introduced earlier).

DevTools CPU profiler treats all variants of function code as
a single function.

ll_prof treats each optimized variant as a separate entry, because
it can disassemble each one of them.

tickprocessor.py not updated -- it is deprecated and will be removed.

BUG=v8/1087,b/3178160
TEST=all existing tests pass, including Chromium layout tests

Review URL: http://codereview.chromium.org/6551011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 16:31:24 +00:00
sgjesse@chromium.org
c89021d162 Added labelled thread names to help with some debugging activity. Right now,
the only platform that it works on is linux (using the prctl API to set the
names of the threads). Other platforms are setup to build properly if the
flag is set, but their thread names are not currently set.

Patch by Mark Lam from Hewlett-Packard Development Company, LP

Review URL: http://codereview.chromium.org/6070009


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 09:09:50 +00:00
mikhail.naganov@gmail.com
e521db4afa Make V8 compilable with profiling support turned off.
BUG=990

Review URL: http://codereview.chromium.org/5890003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 12:14:56 +00:00
mikhail.naganov@gmail.com
670aea0218 Remove log compression support.
This is no longer used in Chromium, and only pollutes code.

BUG=859

Review URL: http://codereview.chromium.org/5575006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 13:24:22 +00:00
kasperl@chromium.org
90b3370374 Update V8 to version 3.0 (re-land r5920).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:31:57 +00:00
kasperl@chromium.org
51b494d096 Revert r5920. Will re-land shortly.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:01:02 +00:00
kasperl@chromium.org
e5860bd6a8 Update V8 to version 3.0.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 09:11:56 +00:00
mikhail.naganov@gmail.com
646a578b3f Simplify ProfLazyMode test on Linux.
Instead of installing signal handler, count samples taken.

Review URL: http://codereview.chromium.org/5325003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-25 15:54:52 +00:00
mikhail.naganov@gmail.com
7a6c7033b2 Fix reporting of impossible nested calls of DOM functions.
It turns out that having PC pointing _exactly_ at callback entry
point is quite probable.

BUG=crbug/60753

Review URL: http://codereview.chromium.org/4169005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-27 17:03:01 +00:00
erik.corry@gmail.com
0dcaac1939 Make Failure inherit from MaybeObject instead of Object.
Review URL: http://codereview.chromium.org/3970005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-25 15:22:03 +00:00
ager@chromium.org
1b410339be Use size_t for return value from fwrite.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/4033005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-25 08:26:12 +00:00
ager@chromium.org
36ed1f611b Use return value from fwrite in log.cc to please compilers.
BUG=453
Review URL: http://codereview.chromium.org/4002005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-25 08:22:23 +00:00
mikhail.naganov@gmail.com
5feede6667 CPU Profiler: postpone moved functions registration until GC completes.
An attempt to retrieve security context for a function may fail if the
destination heap space is in an incomplete state. To fix this, we only
record unknown functions discovered at GC object moves, and then
register them after GC completes.

BUG=crbug/59627

Review URL: http://codereview.chromium.org/3763012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-20 08:32:24 +00:00
vitalyr@chromium.org
e6b33bd20b Support profiling based on linux kernel performance events.
Since 2.6.31 perf_events interface has been available in the
kernel. There's a nice tool called "perf" (linux-2.6/tools/perf) that
uses this interface and provides capabilities similar to oprofile. The
simplest form of its usage is just dumping the raw log (trace) of
events generated by the kernel. In this patch I'm adding a script
(tools/ll_prof.py) to build profiles based on perf trace and our code
log. All the heavy-lifting is done by perf. Compared to oprofile agent
this approach does not require recompilation and supports code moving
garbage collections.

Expected usage is documented in the ll_prof's help. Basically one
should run V8 under perf passing --ll-prof flag and then the produced
logs can be analyzed by tools/ll_prof.py.

The new --ll-prof flag enables logging of generated code object
locations and names (like --log-code), and also of their bodies, which
can be later disassembled and annotated by the script.

Review URL: http://codereview.chromium.org/3831002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5663 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-19 16:45:11 +00:00
kasperl@chromium.org
cabe82959f Try to simplify the semantics of the profiling code by making
sure to suspend the thread (if necessary) on mac/win32 before 
reading the VM state.

Avoid dealing with signals delivered to non-VM threads on 
linux no matter if we're profiling or not.
Review URL: http://codereview.chromium.org/3845006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-18 12:37:07 +00:00
erik.corry@gmail.com
d46fb9d454 New attempt to make the allocation routines 64 bit clean.
This one has been approved by the 64 bit compiler in MSVC
2005 so I hope it also passes the 2008 version.

The --max-new-space-size option is now in kBytes.
The --max-old-space-size option is now in MBytes.

Some issues remain with 64 bit heaps and the counters.  See
http://code.google.com/p/v8/issues/detail?id=887
Review URL: http://codereview.chromium.org/3573005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-30 07:22:53 +00:00
erik.corry@gmail.com
2d0c23bc82 Revert attempt to make heap size 32/64 clean. This change needs to
be done from Windows where the compiler is stricter about truncating
changes.
Review URL: http://codereview.chromium.org/3454035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-28 12:49:25 +00:00
erik.corry@gmail.com
d6313dbbb7 More changes to 32/64 bit correctness.
TBR=vegorov
Review URL: http://codereview.chromium.org/3412038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-28 12:18:19 +00:00
mikhail.naganov@gmail.com
8f22667805 Provide more functions to CPU profiler (fix issue 858).
The cause for missing functions is that some of them are created
from compiled code (see FastNewClosureStub), and thus not get
registered in profiler's code map.

My solution is to hook on GC visitor to provide JS functions
addresses to profiler, only if it is enabled.

BUG=858
TEST=

Review URL: http://codereview.chromium.org/3417019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-24 11:45:12 +00:00
mikhail.naganov@gmail.com
187d249d92 Enhance SafeStackFrameIterator to avoid triggering assertions in debug mode.
When running profiling in debug mode, several assertions in frame
iterators that are undoubtedly useful when iterator is started from a
VM thread in a known "good" state, may fail when running over a stack
of a suspended VM thread. This patch makes SafeStackFrameIterator
to proactively check addresses and bail out from iteration early,
before an assertion will be triggered.

BUG=crbug/55565

Review URL: http://codereview.chromium.org/3436006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5467 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-16 08:23:34 +00:00
whesse@chromium.org
a18f9d1114 Remove dependence of code-stubs on codegen, the virtual frame code generator. Move some functions used by code-stubs and full-codegen from codegen to macro-assembler.
Review URL: http://codereview.chromium.org/3169049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-30 11:48:07 +00:00
lukezarko
5751d8f50c Avoid a potential null dereference wrt the CPU profiler.
GetActiveProfilerModules()/PauseProfiler()/ResumeProfiler() can be reached
from the API when the --prof runtime flag is not set, leading to null
dereferences. Verify that Logger::profiler_ is non-NULL before using it.

Review URL: http://codereview.chromium.org/2843023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-25 15:57:30 +00:00
kaznacheev@chromium.org
ff61618c4b Extend CallIC to support non-constant names.
This speeds up constructs like this: 
var zz='replace'; '123'[zz]('3','4');

Review URL: http://codereview.chromium.org/2280007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 08:27:32 +00:00
mikhail.naganov@gmail.com
3d7ce8ac19 CPU profiler: add secure profiles by filtering out functions using security tokens.
As several pages can run in a single V8 instance, it is possible to
have functions from different security contexts intermixed in a single
CPU profile.  To avoid exposing function names from one page to
another, filtering is introduced.

The basic idea is that instead of capturing return addresses from
stack, we're now capturing JSFunction addresses (as we anyway work
only with JS stack frames.)  Each JSFunction can reach out for
context's security token. When providing a profile to a page, the
profile is filtered using the security token of caller page. Any
functions with different security tokens are filtered out (yes, we
only do fast path check for now) and their ticks are attributed to
their parents.

Review URL: http://codereview.chromium.org/2083005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-18 14:19:33 +00:00
antonm@chromium.org
1e744a3011 Turn some usages of NewArray with DeleteArray in the same scope into ScopedVector or SmartPointer.
That makes it easier to maintain the code---one should care less
about releasing the memory as smart pointers would take care of
this.

Switch to ScopedVector instead Vector for the same semantics in
src/builtins.cc

Review URL: http://codereview.chromium.org/1737023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 12:25:58 +00:00
mikhail.naganov@gmail.com
6f3f2f1c42 Allow new CPU profiling subsystem to coexist nicely with the old one.
This is to make possible enabling usage of the new profiling subsystem
in Chromium without much hassle. The idea is pretty simple: unless the
new profiling API is used, all works as usual, as soon as Chromium
starts to use the new API, it will work too.

Review URL: http://codereview.chromium.org/1635005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-12 07:23:43 +00:00
mikhail.naganov@gmail.com
a6e6131bf7 Fix debug builds.
TBR=ager@chromium.org

Review URL: http://codereview.chromium.org/1572029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-08 14:00:51 +00:00
mikhail.naganov@gmail.com
c520e28dcb Make VM state tracking to be independent of logging and profiling.
Also pull out VMState into its own set of source files.

Review URL: http://codereview.chromium.org/1519027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-08 13:37:39 +00:00
mikhail.naganov@gmail.com
4f5ff869d3 C++ profiles processor: align browser mode with the old implementation, sample VM state.
In browser (DevTools) mode, only non-native JS code and callbacks are reported.
Also, added "(garbage collector)" entry which accumulates samples count in GC state.
Trying to display "(compiler)" and "(external)" only brings confusion,
because it ends up in displaying scripts code under "(compiler)" node, and DOM
event handlers under "(external)" node, which looks weird.

Review URL: http://codereview.chromium.org/1523015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4357 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-07 14:18:26 +00:00
mikhail.naganov@gmail.com
889f6cce74 C++ profiles processor: wire up to VM.
If 'shell' is compiled with 'cppprofilesprocessor=on' and run
with '--prof' flag, top-down and bottom-up call trees are printed
on shell exit.

Review URL: http://codereview.chromium.org/1582004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-06 10:36:38 +00:00
antonm@chromium.org
de070ccfa6 First take on custom call generators.
Review URL: http://codereview.chromium.org/669061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 16:24:31 +00:00
kaznacheev@chromium.org
7d58852374 Implementing inline caches for binary operations (ia32).
This is a subset of a CL reviewed earlier(http://codereview.chromium.org/551093).
The register usage optimisation part has been reviewed and submitted separately.
Two fast cases supported: HeapNumber operands and String operands for ADD.


Review URL: http://codereview.chromium.org/553117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-01 16:24:05 +00:00
mikhail.naganov@gmail.com
b7f0608c9a Logging-related changes.
- when logging 'open-tag' / 'close-tag' events, don't depend on
   FLAG_log (as it may be not enabled, e.g. in Chromium);

 - PauseProfiler / ResumeProfiler were supposing that they
   use 'is_logging_' var exclusively, thus preventing any
   other logging that may be turned on for diagnostic purposes.

Review URL: http://codereview.chromium.org/661246

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3986 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-01 10:41:34 +00:00
mikhail.naganov@gmail.com
b740dea517 Kill some unused code.
It doesn't mean I'm participating in some fixit, just spotted some
code which doesn't have usages and decided to remove it.

Review URL: http://codereview.chromium.org/646007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 12:47:17 +00:00
mikhail.naganov@gmail.com
39e63f0aec Implement tagging of profiler log event blocks.
This change allows to associate integer tags with blocks of profiler
log events, and repeat calls to 'ResumeProfiler' / 'PauseProfiler' in
order to establsh nested (not necessary properly nested) blocks. By
supporting this, we will be able to match WebInspector's CPU profiler
abilities in DevTools.

I also refactored some testing code.

Review URL: http://codereview.chromium.org/619004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3889 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 13:23:46 +00:00
mikhail.naganov@gmail.com
19c1675b94 Fix test failures in debug mode w/snapshots. It turns out that not
all stubs have valid major_keys, and this is OK. So I've added
a check to avoid termination in debug mode.

Review URL: http://codereview.chromium.org/572034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-05 13:07:00 +00:00
mikhail.naganov@gmail.com
e51a05f338 Fix issue 597: builtins and stubs are missing in profiler log when using snapshots.
After this fix, profiles of non-snapshotted VMs are now equivalent to
profiles of snapshotted VMs (having that --log-snapshot-positions is used,
and mksnapshot's log is given to the tick processor script.)

BUG=597

Review URL: http://codereview.chromium.org/574005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-04 21:34:03 +00:00
leonclarke@gmail.com
eaa845804e Get it to compile when ENABLE_LOGGING_AND_PROFILING isn't defined.
I think it currently is defined on all platforms except Android.
Review URL: http://codereview.chromium.org/554101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 17:10:28 +00:00
antonm@chromium.org
29af9c54a4 Merge ObjectIterator::has_next and ObjectIterator::next methods.
This reduces chances of improper usage, see http://code.google.com/p/v8/issues/detail?id=586
for more details.

BUG=586

Review URL: http://codereview.chromium.org/555072

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 22:53:18 +00:00
mikhail.naganov@gmail.com
999e3fca90 Fix issue 553: function frame is skipped in profile when compare stub is called.
The problem appeared due to a fact that stubs doesn't create a stack
frame, reusing the stack frame of the caller function. When building
stack traces, the current function is retrieved from PC, and its
callees are retrieved by traversing the stack backwards. Thus, for
stubs, the stub itself was discovered via PC, and then stub's caller's
caller was retrieved from stack.

To fix this problem, a pointer to JSFunction object is now captured
from the topmost stack frame, and is saved into stack trace log
record. Then a simple heuristics is applied whether a referred
function should be added to decoded stack, or not, to avoid reporting
the same function twice (from PC and from the pointer.)

BUG=553
TEST=added to mjsunit/tools/tickprocessor

Review URL: http://codereview.chromium.org/546089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 16:42:41 +00:00
mikhail.naganov@gmail.com
37d3972429 Fix issue 571: display descriptive names for code objects from snapshot.
As this is only needed for internal profiling (not for DevTools),
the following approach had been chosen:

 - during snapshot creation, positions of serialized objects inside
   a snapshot are logged;

 - then during V8 initialization, positions of deserealized objects
   are logged;

 - those positions are used for retrieving code objects names from
   snapshot creation log, which needs to be supplied to tick processor
   script.

Positions logging is controlled with the new flag: --log_snapshot_positions.
This flag is turned off by default, and this adds no startup penalty.

To plug this fix to Golem, the following actions are needed:

 - logs created using 'mksnapshot' need to be stored along with VM images;

 - tick processor script needs to be run with '--snapshot-log=...' cmdline
   argument.

BUG=571

Review URL: http://codereview.chromium.org/551062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 16:04:25 +00:00
mikhail.naganov@gmail.com
2af151ee63 Include getters and setters callbacks invocations in CPU profiler log.
Logging getters and setters from DOM API is extremely useful for web
developers as setting (and getting!) several properties can cause
page relayouts which take significant time.

Review URL: http://codereview.chromium.org/434074

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 16:39:18 +00:00
mikhail.naganov@gmail.com
9d440fdd36 Store API callback entry address prior to entering a callback.
Callback entry address is stored in VMState and is later retrieved by
profiler stack sampler. This makes possible relating API entry to JS
stack, and this is simpler than trying to unwind native stack.

Review URL: http://codereview.chromium.org/437004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-23 14:43:00 +00:00
mikhail.naganov@gmail.com
c2f12a7293 Reimplement logging of API callbacks entry points in an easier way.
Now they are logging during "LogCompiledFunctions" cycle. API functions
are detected by examining SFI's "function_data" field.

Review URL: http://codereview.chromium.org/414036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-23 09:19:24 +00:00
mikhail.naganov@gmail.com
a9d7c378d8 Add logging of callbacks in prof-lazy mode.
This is needed to show calls to DOM in CPU profiles. I can think
of a better approach like adding specific functions into V8 API
for explicitly providing callback names and modifying bindings codegen
appropriately. My plan is as follows:
 - submit this CL;
 - implement anything I need to process log data and display DOM
   calls in profiles;
 - think again about adding specific functions and modifying bindings
   codegen.

BUG=http://code.google.com/p/chromium/issues/detail?id=27613

Review URL: http://codereview.chromium.org/402100

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-20 12:15:46 +00:00
erik.corry@gmail.com
2d30963d1d Log the stubs found in the snapshot so the profiler can give
a sensible output.
Review URL: http://codereview.chromium.org/385039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 12:35:50 +00:00
lrn@chromium.org
d53f05e3e2 Fix warnings on Win64.
Set warning level to /W3 and change implicit conversions from size_t
to int. Most "fixes" are simply manifesting the implicit casts or using
a special strlen replacement that returns int.

Review URL: http://codereview.chromium.org/390004


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 09:50:06 +00:00
mikhail.naganov@gmail.com
492dc0643f Fix crbug/24815. Changes affect profiler "lazy" mode used for V8 in Chromium.
- don't engage the processing thread of CPU profiling until the first time profiling is resumed, this saves us a thread allocation for the majority of users;
- don't log shared libraries addresses: this is useless for JS-only profiling, and also consumes time on startup.

Review URL: http://codereview.chromium.org/340013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 09:13:11 +00:00
mikhail.naganov@gmail.com
efb8cee324 Add initial semi-working producers profile.
Turned on with '--log-producers' flag, also needs '--noinline-new' (this is temporarily), '--log-code', '--log-gc'. Not all allocations are traced (I'm investigating.)

Stacks are stored using weak handles. Thus, when an object is collected, its allocation stack is deleted.

Review URL: http://codereview.chromium.org/267077

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-15 07:50:23 +00:00
mikhail.naganov@gmail.com
572a050102 Fix a crash in Logger::LogCompiledFunctions due to a presence of scripts with disposed source.
When starting JS profiling under Chromium, a map from function addresses to function names is created. During it, for sourceful scripts, an attempt to access script source is made. This can cause a crash, if a source is an external string, which already has been disposed. We had a similar problem in the past with DebugGetLoadedScripts.

BUG=http://crbug.com/23768
TEST=test-log/Issue23768

Review URL: http://codereview.chromium.org/269003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-07 12:20:02 +00:00
mikhail.naganov@gmail.com
9b4c950963 Heap profiler: count the number of back references for objects.
Also, perform some refactoring to reuse common code between constructor and retainer profiles.

Review URL: http://codereview.chromium.org/209028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-18 12:05:18 +00:00
mikhail.naganov@gmail.com
abc0bd46f6 Add initial version of retainers heap profile.
The profile is taken together with constructors profile. In theory, it
should represent a complete heap graph. However, this takes a lot of memory,
so it is reduced to a more compact, but still useful form. Namely:

 - objects are aggregated by their constructors, except for Array and Object
   instances, that are too hetereogeneous;

 - for Arrays and Objects, initially every instance is concerned, but then
   they are grouped together based on their retainer graph paths similarity (e.g.
   if two objects has the same retainer, they are considered equal);

Review URL: http://codereview.chromium.org/200132

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-16 13:41:24 +00:00
mikhail.naganov@gmail.com
0411b14ffa Heap profiler: account primitive string objects as being constructed using 'String'.
Also:
- move constructor name getter near similar class name getter method;
- if the constructor is not present, use 'Object', as for class name, this eliminates a special case.

Review URL: http://codereview.chromium.org/202018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 11:46:09 +00:00