Commit Graph

65 Commits

Author SHA1 Message Date
mstarzinger@chromium.org
04a5b3d6b6 Revert "deprecate Context::New which returns Persistent"
This reverts r14573 because of test failures in no-snapshot mode in the
cctest/test-debug/ScriptCollectedEventContext test case.

TBR=dcarney@chromium.org,svenpanne@chromium.org
TEST=cctest/test-debug/ScriptCollectedEventContext

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-07 16:28:51 +00:00
dcarney@chromium.org
386de8010b deprecate Context::New which returns Persistent
BUG=
TBR=marja@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-07 13:29:24 +00:00
dcarney@chromium.org
0cf128390f deprecate WriteAscii and MayContainNonAscii
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-03 06:47:24 +00:00
dcarney@chromium.org
cf5ff5a14c first step to remove unsafe handles
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 20:18:42 +00:00
danno@chromium.org
600ed94a3d Update tests to use std::isnan instead of isnan
Should fix compilation breakage after r14352

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 14:20:36 +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
svenpanne@chromium.org
53310ac152 Added a version of the v8::HandleScope constructor with an Isolate and use that consistently.
I tried to limit the use of v8::Isolate::GetCurrent() and v8::internal::Isolate::Current() as much as possible, but sometimes this would have involved restructuring tests quite a bit, which is better left for a separate CL.

BUG=v8:2487

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-15 12:06:53 +00:00
jkummerow@chromium.org
ed6c366f98 Add missing license headers.
BUG=chromium:98597

Review URL: https://codereview.chromium.org/12486003
Patch from Paweł Hajdan Jr. <phajdan.jr@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-07 11:12:26 +00:00
svenpanne@chromium.org
52d10a68cb Add Isolate parameter to Persistent class.
BUG=v8:2487

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-25 08:31:46 +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
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
58824435d1 Pick the namespace alias 'i' from v8.h.
These files already include v8.h so they don't need to define the
namespace alias again.

Signed-off-by: Thiago Farina <tfarina@chromium.org>

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 09:49:55 +00:00
mikhail.naganov@gmail.com
e1e2b369eb Convert *.js files of cctest/test-log into "resources".
This allows running cctest from anywhere.

I was to rename single-letter variables in my script due to an encountered issue
in JSMin (http://code.google.com/p/v8/issues/detail?id=1557).

R=svenpanne@chromium.org,sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 11:38:18 +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
mikhail.naganov@gmail.com
e4f7860a68 Clean up conditionals in tests after r8622.
R=sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 10:08:52 +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
sgjesse@chromium.org
8099bf3531 Revert "Never use classic code generator."
This reverts r7469 which might have caused the timeouts on the buildbot.

TBR=ager@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 14:38:30 +00:00
ager@chromium.org
1528bf7240 Never use classic code generator.
Crankshaft is now the default on all platforms. This is the first
patch on the way to removing the classic code generator from the
system.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 10:52:18 +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
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
antonm@chromium.org
93f8e3d821 Temporary disable comparison of optimizability of code objects in some cases.
With crankshaft, a code object can change its optimizability: it can start as
optimizable code object, but later we can find out it was a bad idea to
optimize it.  Alas, currently we don't have a proper event to communicate
this back to logger.  Hence we temporary allow a code object to be viewed
as optimizable judging from logs while being unoptimizable judging from
heap traversal.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6553 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-01 12:39:02 +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
3d8e94863d Improve sampler resolution on Linux.
Instead of relying on itimer signals from kernel, send them
ourselves from a separate thread. This disables an ability
to profile multiple VM threads on Linux, but it anyway doesn't
work on other platforms, so we need a common solution for
it (issue 913 created to track this).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-26 14:51:31 +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
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
mikhail.naganov@gmail.com
c413105da7 Make the assumption on the minimum buffer size for GetLogLines explicit.
Review URL: http://codereview.chromium.org/799008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 09:48:01 +00:00
kasperl@chromium.org
afe1cfa6de Remove the unlocker from the JS thread in ProfMultipleThreads to
avoid getting a profiling sample while not holding the locker,
because we will not get a stack sample in that case.
Review URL: http://codereview.chromium.org/668063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 15:03:36 +00:00
kasperl@chromium.org
8c086c50dd Try to fix issue 632 by being more careful in the locking/unlocking
in the test-log/ProfMultipleThreads.
Review URL: http://codereview.chromium.org/669058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 13:25:23 +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
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
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
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
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
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
erik.corry@gmail.com
ae882b44e7 * Fix memory leaks caused by thread local data being lost.
* Rename some instance variables and accessors to fit code style.
* Don't overwrite existing thread ID.
Review URL: http://codereview.chromium.org/251014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-28 12:25:21 +00:00
mikhail.naganov@gmail.com
65dcf75c2c Linux profiler: check whether signal handler is called in the VM thread.
I have several Chromium's core files having SIGPROF signal handler called in the context of an arbitrary thread, causing a crash. This change introduces checking of current thread in the signal handler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-04 11:16:51 +00:00
mike@belshe.com
f736ed3ff8 Forgot to change API signature for V8 tests.
BUG=none
TEST=none

TBR=ager

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2749 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-25 03:18:40 +00:00
mikhail.naganov@gmail.com
5470f9b132 Add an ability to initiate GC through V8 API.
I'm planning to use it in DevTools heap profiler. It is a common scenario in debugging memory leaks to enforce GC, then perform an operation, then enforce GC again to check for non-collected (that is, leaked) objects. Using the existing GC extension isn't possible because it doesn't exposed in the normal operation mode of Chromium.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 14:14:01 +00:00
kasperl@chromium.org
91a6039ffa Fix lint issues. TBR=mikhail.naganov@gmail.com
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 09:10:29 +00:00