Commit Graph

15 Commits

Author SHA1 Message Date
yurys@chromium.org
ebdf62c238 Merge SafeStackTraceFrameIterator into SafeStackFrameIterator
SafeStackFrameIterator was used solely to implement SafeStackTraceFrameIterator. This CL simply merges them and updates usage of SafeStackTraceFrameIterator to use SafeStackFrameIterator (a bit shorter name).

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15305 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 07:14:06 +00:00
yurys@chromium.org
c4224f09a2 Notify CPU profiler when calling native getters
This change modifies code produced by BaseLoadStubCompiler::GenerateLoadCallback so that instead of calling AccessorGetter direcly it calls InvokeAccessorGetter which changes VM state and calls the actual callback. This way CPU profiler knows which external callback is being executed in this case. Indirect call happens only if CpuProfiler::is_profiling() is true.

This is exactly same change as r15116 with a build fix for test-api.cc

BUG=244580
TBR=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 19:16:35 +00:00
yurys@chromium.org
24ec017182 Revert "Notify CPU profiler when calling native getters"
This reverts commit f323d984a73bab345c4eab5c1907552ccfa7ccaa.

Broke compilation on the bots with an error that doesn't occur locally:

  CXX(target) /mnt/data/b/build/slave/v8-linux-debug/build/v8/out/Debug/obj.target/cctest/test/cctest/test-bignum-dtoa.o
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = int]’:
../test/cctest/test-api.cc:1129: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = unsigned int]’:
../test/cctest/test-api.cc:1136: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = double]’:
../test/cctest/test-api.cc:1143: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = bool]’:
../test/cctest/test-api.cc:1150: error: insufficient contextual information to determine type
../test/cctest/test-api.cc: In function ‘void FastReturnValueCallback(const v8::FunctionCallbackInfo<v8::Value>&) [with T = void]’:
../test/cctest/test-api.cc:1157: error: insufficient contextual information to determine type
  CXX(target) /mnt/data/b/build/slave/v8-linux-debug/build/v8/out/Debug/obj.target/cctest/test/cctest/test-circular-queue.o

BUG=None
TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 14:05:19 +00:00
yurys@chromium.org
1a3c3cee9d Notify CPU profiler when calling native getters
This change modifies code produced by BaseLoadStubCompiler::GenerateLoadCallback so that instead of calling AccessorGetter direcly it calls InvokeAccessorGetter which changes VM state and calls the actual callback. This way CPU profiler knows which external callback is being executed in this case.

BUG=244580
R=dcarney@chromium.org, loislo@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 13:46:33 +00:00
yurys@chromium.org
f6499289f6 Simulator specific code that is the same on all platforms as well as TickSample instance retrieval extracted into SampleHelper class.
Drive-by: extracted platform-independent pieces of Sampler::PlatformData into PlatformDataCommon.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 07:52:08 +00:00
yurys@chromium.org
665c644940 Fix two CPU profiler tests on ARM and MIPS simulators
Use Simulator::get_pc instead of Simulator::get_register(pc) as the latter
will return value adjusted by Instruction::kPCReadOffset.

BUG=v8:2628
R=loislo@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 12:09:03 +00:00
dslomov@chromium.org
acf1a7c91c Accurate function prototypes for native calls from ARM simulator.
This is a resubmit of codereview.chromium.org/13818012 with the following modifications:
- src/x64/code-stubs-x64.cc for changes specific to Win64   calling conventions.
- src/sampler.cc for Native Client support

BUG=v8:2614

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

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

Patch from Brad Chen <bradchen@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 11:34:43 +00:00
dslomov@chromium.org
c5252a1bcd Revert "Accurate function prototypes for native calls from ARM simulator."
This reverts commit r14991. (one file missing)

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 11:31:09 +00:00
dslomov@chromium.org
d362e727e3 Accurate function prototypes for native calls from ARM simulator.
This is a resubmit of codereview.chromium.org/13818012 with the following modifications:
- src/x64/code-stubs-x64.cc for changes specific to Win64   calling conventions.
- src/sampler.cc for Native Client support

BUG=v8:2614

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

Patch from Brad Chen <bradchen@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-30 11:16:40 +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
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
yurys@chromium.org
2e41f0ce1a pthreads seem to be fully supported on Linux and Android which allows to remove many #ifdefs.
Also OS::Sleep(interval_) is used to pause sampling thread on all platforms. It makes no sense to send signal once 900mks to compensate 100mks delay on signal delivery as the signals would be delivered once 900mks.

BUG=None

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14278 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 12:06:43 +00:00
yurys@chromium.org
9585ead1e9 This change is a continuation of the refactoring started in r14265.
Renamed SignalSender to SamplerThread to match platforms that don't support signal sending.

Cygwin and Windows implementations are almost identical. Mac OS X uses different API to suspend thread but apart from that it is very similar to Windows implenenation.

BUG=None

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 08:54:33 +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