Commit Graph

335 Commits

Author SHA1 Message Date
mikhail.naganov@gmail.com
a23fd3284a Added the simplest call stack sampling and call profile in tick processor output.
Currently only two stack frames are sampled (current function and its caller).

Output of tick processor looks like this:

 [Call profile]:
   total  call path
   15.2%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: montReduce crypto.js:583
    6.5%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: bnpSquareTo crypto.js:431
    2.9%  Builtin: KeyedStoreIC_Generic  <-  LazyCompile: montReduce crypto.js:583
    2.3%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: bnpMultiplyTo crypto.js:415

Tested under Windows, Linux and OS X.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 14:45:45 +00:00
sgjesse@chromium.org
969d43e785 Changed all log messages to be handled through the LogMessageBuilder instead of through fprintf directly to the log file.
Added a flag for the runtime %Log call and fixed its arguments checking. Use of %Log is only for debugging.
Review URL: http://codereview.chromium.org/21406

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1290 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 12:49:35 +00:00
sgjesse@chromium.org
2ffc8d981e Fixed Linux build.
TBR=ager
Review URL: http://codereview.chromium.org/21402

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 08:31:53 +00:00
sgjesse@chromium.org
577741308b First step in refactoring the logging system to allow the logging messages to have other destinations than an open file.
This change introduces a log message builder which builds the log message in a static string buffer instead of formatting the log message through fprintf. Currently this message can only be written to a file afterwards.

Changed the code related events to use the log message builder.
Review URL: http://codereview.chromium.org/20406

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 08:21:24 +00:00
olehougaard
e7150a8d8a Fixing a few bugs to make the --log-state-change option work.
Review URL: http://codereview.chromium.org/20220

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-11 07:38:31 +00:00
mikhail.naganov@gmail.com
3835e915c4 Adding src_file_name:line_number into perf log entries for compiled JS functions.
Thus, instead of the following profiler records:
   1.5%    1.5%   LazyCompile: <anonymous>
we'll now have these:
   1.5%    1.5%   LazyCompile: <anonymous> richards.js:309

Basically, I translated two functions from messages.js into C++.
In the next CL I will update messages.js to use added native functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 10:52:02 +00:00
mike@belshe.com
75037cbd6e Enable programmatic access to Profile pause/resume
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-29 19:47:00 +00:00
christian.plesner.hansen@gmail.com
4e78736900 Fixed build with no ENABLE_LOGGING_AND_PROFILING
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-07 14:24:08 +00:00
christian.plesner.hansen@gmail.com
afcc36a417 Added runtime call to the logging infrastructure. Made some changes
to the way regexps are being logged.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-06 13:24:52 +00:00
christian.plesner.hansen@gmail.com
d7c933e7ae Added support in the profiler for creating 'regions' that cover part
of the generated code.  These can be used by the profiler to
categorize the ticks that occur within generated code and thereby show
more detailed information about where time is spent in generated code.
For instance, this is what the profiler displayed for a simple regexp
benchmark with irregexp-native before:

[JavaScript]:
   total  nonlib   name
   87.2%   87.2%   RegExp: (?:\w*\W+)*

This is what we can display now:

[JavaScript]:
   total  nonlib   name
   87.2%   87.2%   RegExp: (?:\w*\W+)*
                   -  53.0%  56.7% BranchOrBacktrack
                   -  14.9%  59.8% CheckCharacterLT
                   -  13.7%  20.4% CheckStackLimit
                   -   6.7%   6.7% SafeCall
                   -   2.7%   7.0% CheckCharacterGT
                   -   2.4%   2.4% SafeReturn
                   -   2.1%   2.1% LoadCurrentCharacter
                   -   1.8%   1.8% PushRegister
                   -   0.9%   0.9% PopRegister
                   -   0.9%   0.9% AdvanceRegister
                   -   0.3%   0.3% PopCurrentPosition
                   -   0.3%   0.3% CheckGreedyLoop
                   -   0.0%  20.4% PushBacktrack
                   -   0.0%  22.3% CheckCharacter
                   -   0.0%   2.4% IfRegisterLT


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-19 13:12:43 +00:00
deanm@chromium.org
fa04fa8a19 Make Logger::SuspectReadEvent extract the class name from the object. This makes the lone caller cleaner, and also avoids a tiny bit of work in the default case of not running with --log-suspect.
Review URL: http://codereview.chromium.org/13655

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 09:19:02 +00:00
christian.plesner.hansen@gmail.com
cc3e472843 - Fixed regexp logging issue.
- Removed use of std::set.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@883 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-02 08:16:12 +00:00
lrn@chromium.org
a03b447bd0 Arguments on the command line are made available as a global "arguments" array.
Fix for non-empty assertion in debug mode (string representation of empty arguments is a single space, not an empty string).


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-11 14:16:24 +00:00
erik.corry@gmail.com
b4e7335c0c Removed some unsafe uses of StringShape.
Simplified some uses of StringShape.
Removed unused function SlicedStringFlatten.
Review URL: http://codereview.chromium.org/9408

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-05 10:26:08 +00:00
erik.corry@gmail.com
eca89dc765 Create an abstraction for the string type flags so that they can be cached.
Read the objects.h change first to understand what's going on here.
Review URL: http://codereview.chromium.org/9038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-03 10:16:05 +00:00
olehougaard
867d504395 Fixing profiling when using snapshot.
Review URL: http://codereview.chromium.org/8655

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 09:53:52 +00:00
christian.plesner.hansen@gmail.com
9d9f608a38 - Added caching of regexp data in the compilation cache.
- Changed the structure of regexp objects from having two internal
  fields to having a single field containing a fixed array, since it's
  easier to store the whole fixed array in the cache.
- Move printing of the command to after printing std{err,out} in the
  compact progress indicators in the test framework.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 08:40:02 +00:00
christian.plesner.hansen@gmail.com
85251f756c - Changed regexp logging to include the string being matched and to
escape commas.
- Fixed issue with block-comparing unaligned strings on arm.
- Added short documentation to one of the Persistent constructors.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-22 12:00:19 +00:00
christian.plesner.hansen@gmail.com
5d4c72efb4 Review-related changes
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@505 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-15 08:50:34 +00:00
christian.plesner.hansen@gmail.com
a213e39c77 Added a way to add timestamps to the log file name
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-15 08:50:22 +00:00
kasperl@chromium.org
4269973acd Log ticks when the prof flag is set. Avoid letting --prof
imply --log.
Review URL: http://codereview.chromium.org/6444

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-03 10:51:08 +00:00
christian.plesner.hansen@gmail.com
e060c52c1c Changed so that --log-code implies --log.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-03 10:42:53 +00:00
christian.plesner.hansen@gmail.com
06fa6d1cde - Case-sensitive atomic regular expressions now use the same code as
String.indexOf to do matching.
- The --log option is no longer automatically enabled by the other log
  options.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-02 15:35:28 +00:00
christian.plesner.hansen@gmail.com
6d47b29765 - Added new object type, RegExp, for regular expressions.
- Renamed some ::kSizes to ::kHeaderSizes to avoid confusion.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-23 11:45:43 +00:00
iposva@chromium.org
27e8ffe324 - Add support for building the ARM simulator version of V8 to the Xcode project.
- Added new compilation-cache.[cc|h] files.
- Fixed log.cc to be able to build without ENABLE_LOGGING_AND_PROFILING defined.

The next step is to mirror the xcconfigs in a separate change.
Review URL: http://codereview.chromium.org/1948

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-12 17:25:38 +00:00
deanm@chromium.org
77196c5771 This is a new static flag system, designed to have all flags in a central place, and compiled into the binary without requiring static constructors for registration. All flags are moved out of the specific modules and into flags.defs, with different sections for debug, release, etc. The flag variables are always defined. For example, a debug flag in release mode still exists, but is read only and set to the default value.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@296 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-12 10:19:33 +00:00
christian.plesner.hansen@gmail.com
32cf7fd9a1 Replaced calls to functions that msvc consider deprecated. Used
Vector<...> in more places to be sure that buffers have a length
associated with them.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-11 14:34:48 +00:00
ager@chromium.org
888abb1bfd Fix bug in function context slot lookup. There were two problems: we
read at the wrong index in the scope information and we forgot to add
Context::MIN_CONTEXT_SLOTS to the index.

This fixes issue 24.
Review URL: http://codereview.chromium.org/1938

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-11 13:00:30 +00:00
lrn@chromium.org
9d3557ef99 Formatting fixes (e.g., whitespace at end of line)
Added in-file documentation for --log-regexp switch.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@278 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-11 12:57:27 +00:00
lrn@chromium.org
c5d98b775d Added -log-regexp option to log all compilations and executions of regular expressions.
Slightly modified SmartPointer.
Made String.ToWideCString return a SmartPointer instead of a plain pointer.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-11 11:24:45 +00:00
christian.plesner.hansen@gmail.com
9bed566bdb Changed copyright header from google inc. to v8 project authors.
Added presubmit step to check copyright.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-09 20:08:45 +00:00
christian.plesner.hansen
c42f5829a1 Included mjsunit JavaScript test suite and C++ unit tests.
In the shell sample don't print the result of executing a script, only
evaluating expressions.

Fixed issue when building samples on Windows using a shared V8
library.  Added visibility option on Linux build which makes the
generated library 18% smaller.

Changed build system to accept multiple build modes in one build and
generate seperate objects, libraries and executables for each mode.

Removed deferred negation optimization (a * -b => -(a * b)) since this
visibly changes operand conversion order.

Improved parsing performance by introducing stack guard in preparsing.
Without a stack guard preparsing always bails out with stack overflow.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-08-22 13:33:59 +00:00
mads.s.ager@gmail.com
769cc962a0 Improved performance of unary addition by avoiding runtime calls.
Fixed the handling of '>' and '<=' to use right-to-left conversion and left-to-right evaluation as specified by ECMA-262.

Fixed a branch elimination bug on the ARM platform where incorrect code was generated because of overly aggressive branch elimination.

Improved performance of code that repeatedly assigns the same function to the same property of different objects with the same map.

Untangled DEBUG and ENABLE_DISASSEMBLER defines.  The disassembler no longer expects DEBUG to be defined.

Added platform-nullos.cc to serve as the basis for new platform implementations.


git-svn-id: http://v8.googlecode.com/svn/trunk@9 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-08-06 10:02:49 +00:00
kasper.lund
7276f14ca7 Changed all text files to have native svn:eol-style.
Added a few samples and support for building them. The samples include a simple shell that can be used to benchmark and test V8.

Changed V8::GetVersion to return the version as a string.

Added source for lazily loaded scripts to snapshots and made serialization non-destructive.

Improved ARM support by fixing the write barrier code to use aligned loads and stores and by removing premature locals optimization that relied on broken support for callee-saved registers (removed).

Refactored the code for marking live objects during garbage collection and the code for allocating objects in paged spaces. Introduced an abstraction for the map word of a heap-allocated object and changed the memory allocator to allocate executable memory only for spaces that may contain code objects.

Moved StringBuilder to utils.h and ScopedLock to platform.h, where they can be used by debugging and logging modules. Added thread-safe message queues for dealing with debugger events.

Fixed the source code reported by toString for certain builtin empty functions and made sure that the prototype property of a function is enumerable.

Improved performance of converting values to condition flags in generated code.

Merged disassembler-{arch} files.


git-svn-id: http://v8.googlecode.com/svn/trunk@8 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-07-30 08:49:36 +00:00
christian.plesner.hansen
43d26ecc35 Initial export.
git-svn-id: http://v8.googlecode.com/svn/trunk@2 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-07-03 15:10:15 +00:00