Commit Graph

212 Commits

Author SHA1 Message Date
ager@chromium.org
3fe0bc0436 Remove asserts that do not hold when lazily compiling extension code.
Add checks for the use of eval and with in natives files to the js2c
script.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-31 15:02:54 +00:00
lrn@chromium.org
9230ad29eb ARM native regexps.
Review URL: http://codereview.chromium.org/173567


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-31 12:40:37 +00:00
christian.plesner.hansen@gmail.com
af6c6a5533 Api inlining. Made some core functionality available in the api and
made inline versions of some hot functions.  Changed api to use
internal Object pointers rather than void pointers.

Speeds up getElementById by ~7%.
Review URL: http://codereview.chromium.org/173348

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 10:33:11 +00:00
whesse@chromium.org
830de0f73f X64: Set target machine for Visual Studio projects to x64.
Review URL: http://codereview.chromium.org/174137

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-24 09:12:07 +00:00
mark@chromium.org
dfcfacf1f9 Enable -fstrict-aliasing in the GYP build of V8 for the Mac in Release mode.
-fstrict-aliasing is enabled by mainline gcc at -O2 and higher, but in Apple
gcc, it must be enabled explicitly.  This results in a 1.5% improvement in V8
benchmark scores.

This also removes the -fno-exceptions and -fno-rtti settings from v8.gyp for
the Mac, and removes -fno-rtti from v8.gyp for Linux, because these settings
have become part of Chromium's common.gypi, included here, as of r23304 at the
latest.  The settings in v8.gyp have become redundant.
Review URL: http://codereview.chromium.org/174154

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 19:12:59 +00:00
mark@chromium.org
b77e2354cc Don't use -fomit-frame-pointer to build Mac V8. The Chrome crash reporting
system can't currently process stacks produced by gcc -fomit-frame-pointer
properly.  The drawback outweighs the 2% performance improvement.  Once
the crash reporting system is able to handle this optimization, it should be
revisited.
Review URL: http://codereview.chromium.org/173123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 14:48:52 +00:00
kasperl@chromium.org
43da36aa08 Experimental change to omit frame pointers from V8 on Mac
built through the v8.gyp file. The optimization flags for
Mac and Linux (both gcc-based) builds are now much closer.
Review URL: http://codereview.chromium.org/173117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 11:37:56 +00:00
kasperl@chromium.org
6d11b96067 Try compiling V8 for Mac with -O3 when using the v8.gyp file.
Review URL: http://codereview.chromium.org/174138

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 11:13:51 +00:00
sgjesse@chromium.org
b9f39307be Create a set of x64 Visual studio project files and corresponding solution.
These files will make it possible to start working with the 64-bit version on Windows.

The GUID's of the x64 project files are the same as their ia32 counterparts, but that does not matter as they will never be used in the same solution.

Added a temporary #error when building 64-bit version on Windows.
Review URL: http://codereview.chromium.org/171111

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 07:32:48 +00:00
mikhail.naganov@gmail.com
d87f83c5f8 Fix issue 427: JS tick processor now works out-of-the-box for Chromium on Windows.
MSVS names '.map' file using only module's name, so both 'a.exe' and 'a.dll' will have 'a.map' file. To distinguish an originating module, we're now checking for image base which is always 00400000 for .exe files, and not 00400000 for .dlls.

Verified that windows-tick-processor can now process logs from Chromium using .map file generated for 'chrome.dll', an that it still works for V8's 'shell.exe'.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 13:45:03 +00:00
mikhail.naganov@gmail.com
910b5ef31a Fix issue 420: accept truncated log files.
http://code.google.com/p/v8/issues/detail?id=420

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 09:31:58 +00:00
lrn@chromium.org
166cf2e4ad Fix typo in v8.gyp
Review URL: http://codereview.chromium.org/164555


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-14 12:39:48 +00:00
lrn@chromium.org
4254388c14 X64: Implement RegExp natively.
Review URL: http://codereview.chromium.org/165443


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-14 11:24:32 +00:00
mikhail.naganov@gmail.com
66fe1138dc Fix mac-nm script to support filenames w/spaces
Review URL: http://codereview.chromium.org/164476


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 14:03:12 +00:00
mikhail.naganov@gmail.com
33f54fa6e2 X64: enable stack sampling in profiler.
Added necessary code to initialize Top::js_entry_sp value.
Renamed 'test-log-ia32' test to 'test-log-stack-tracer' and enabled it in 64-bit version.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 11:07:05 +00:00
kmillikin@chromium.org
3a472fada8 Basic infrastructure for fast two-pass compilation. A CFG is
generated in one-pass from the source AST, code is generated from the
CFG.  Enabled by the flag --multipass and disabled by default.

Rudimentary and currently only supports literal expressions and return
statements.  There are some other known limitations (e.g., missing
support for tracing).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 11:06:17 +00:00
mikhail.naganov@gmail.com
340bb1092d Remove the rest of references to jsregexp-inl.h
TBR=kasperl@chromium.org

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 07:55:07 +00:00
mikhail.naganov@gmail.com
9e8216ef22 Introduce first approximation of constructor heap profile for JS objects.
It is activated with '--log-gc' flag.

JS object size is calculated as its size + size of 'properties' and 'elements' arrays, if they are non-empty. This doesn't take maps, strings, heap numbers, and other shared objects into account.

As Soeren suggested, I've moved ZoneSplayTree from jsregexp to zone, and removed now empty jsregexp-inl header file.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 08:10:19 +00:00
deanm@chromium.org
1a2938dcc8 Add x64 to the gyp build.
Review URL: http://codereview.chromium.org/159502


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 20:32:57 +00:00
mikhail.naganov@gmail.com
ee340a52ff X64: Fixes to enable C/C++ functions processing in profiler.
- rewrote Linux version of LogSharedLibraryAddresses to work correctly with 64-bit libs;
 - fixed address length restriction in JS tickprofiler script.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 15:37:05 +00:00
mikhail.naganov@gmail.com
ec526df16f Heap profiling: add logging of heap memory stats (capacity, used) under 'log-gc' flag.
Also changed time reporting to system time to be able to get synchronized with other memory (e.g. DOM) size status.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-20 09:38:44 +00:00
iposva@chromium.org
260cacfde7 - Add frame-element.cc to the Xcode project.
Review URL: http://codereview.chromium.org/155680

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 06:32:29 +00:00
kasperl@chromium.org
124ef540c0 Patch by Mark Mentovai. Don't put static variables inline.
Original review: http://codereview.chromium.org/149768

TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/155679

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 05:37:09 +00:00
kasperl@chromium.org
a6e5a0268b Revert r2478. Avoiding dead code stripping for mksnapshot
wasn't enough.

TBR=iposva@chromium.org
Review URL: http://codereview.chromium.org/155678

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 05:00:38 +00:00
kasperl@chromium.org
ca340d1e1b Patch by Mark Mentovai: Disable dead code stripping for mksnapshot on
Mac OS to work around code generation issue; see the issue details on
http://code.google.com/p/v8/issues/detail?id=404.

Original review: http://codereview.chromium.org/155591


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 06:55:39 +00:00
mikhail.naganov@gmail.com
36b69749a5 Add heap log processing script originally written by Kevin.
Also, add user time into heap sample begin events to make '--log-gc' flag alone sufficient for producing heap logs (previously, samples times were extracted from scavenge events which are only logged with '--log' flag).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 07:09:48 +00:00
whesse@chromium.org
894af58c82 Change tests status for x64, make test runner pass --arch flag to Scons, add to x64 disassembler. Copied from http://codereview.chromium.org/155346 so it can be committed.
Review URL: http://codereview.chromium.org/149608

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 11:39:45 +00:00
mikhail.naganov@gmail.com
e0b829b1a5 TickProcessor: more accurate mapping of statically compiled code on Linux.
'nm' is now called with an option to report function code sizes. Static code entries are restricted to the sizes reported, and the remaining unnamed code is attributed to a library as a whole. This makes reports more accurate, as some functions are tiny, but has chunks of unnamed code behind them.

This change doesn't affect reporting on Windows, as in .map files function code sizes aren't specified.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 09:47:44 +00:00
mikhail.naganov@gmail.com
73710e057a Implement shared libraries logging on Mac OS X, added required support in Tick Processor.
Review URL: http://codereview.chromium.org/155437

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 05:01:06 +00:00
iposva@chromium.org
1ea35a858f - Added missing braces in an if statement as a drive-by-edit.
- Removed executable bits from Xcode project file.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 15:00:35 +00:00
deanm@chromium.org
686718541b Fix problems with including parser.h from the Windows platform SDK instead of v8 by making sure that the v8 include path comes first.
Review URL: http://codereview.chromium.org/149383


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 10:52:54 +00:00
mikhail.naganov@gmail.com
32b0e47fa5 Add automatic tests for Tick Processor, take two.
Now tests can be run from any directory. Location of test data is now determined using test file location provided by 'testcfg.py' script.

Tested under Linux, Mac, and Windows.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 06:39:38 +00:00
kasperl@chromium.org
1dbb07fecc Re-add v8_shell target to v8.gyp. Patch by Joel Stanley.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 05:25:08 +00:00
deanm@chromium.org
d60d7bc9c4 Fix missing include directories in v8.gyp.
Review URL: http://codereview.chromium.org/149331


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 15:36:12 +00:00
deanm@chromium.org
54dd175cac Correct the location of libraries-empty.cc in v8.gyp.
Review URL: http://codereview.chromium.org/155220


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 15:29:16 +00:00
deanm@chromium.org
0bda9493b8 Correct the location of snapshot.cc in v8.gyp.
Review URL: http://codereview.chromium.org/155219


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 15:22:44 +00:00
deanm@chromium.org
00b9b2e5e4 Cleanup v8.gyp. This also drops a bunch of unused targets (the shell, d8,
etc).

There are now two gyp variables to control whether we build snapshots and which
target we are building for.  This allows you to easily cross-compile for arm and
disable snapshots.

Patch by Joel Stanley.

Original review: http://codereview.chromium.org/149243

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 14:56:56 +00:00
kasperl@chromium.org
0684291c89 Revert r2372 to get the tree green again.
TBR=mikhail.naganov@gmail.com
Review URL: http://codereview.chromium.org/155137

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2377 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 13:06:40 +00:00
mikhail.naganov@gmail.com
0f7b263bdd Add automatic tests for Tick Processor.
Added tests for cmdline args parsing, symbols processing, and the whole process.

Tick Processor code was refactored to make it testable.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 12:11:12 +00:00
lrn@chromium.org
72de7ab74e Separate native and interpreted regexp by compile time flag, not runtime.
Clean-up of RegExp code.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 08:11:19 +00:00
antonm@chromium.org
ecfd1f1017 Attempt to reduce performance penalty for logging and profiling
Review URL: http://codereview.chromium.org/125141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 13:09:34 +00:00
mikhail.naganov@gmail.com
1e18e55c15 Two requested changes to tick processor.
1. If D8_PATH isn't specified, first try to locate 'd8' shell in path,
   and if not found, fallback to the one in tools_path/..
2. Add '--nm=<nm_exec>' parameter to specify 'nm' executable to use.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-20 12:54:02 +00:00
mikhail.naganov@gmail.com
6b03961d4c Fix 'nm' results parsing in tickprocessor.
Without an explicit check if a function belongs to shared library address space, "finishing" a library symbols processing with 'addPrevEntry(libEnd);' can cause emission of code entries which cover almost the entire address space, shadowing other code.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-19 07:08:31 +00:00
mikhail.naganov@gmail.com
a1a962f65e Implemented processing of compressed log files.
- fixed address delta calculation;
- code creations are also compressed to be in sync with other events;
- factored out a base class from TickProcessor to reuse code in DevTools profiler.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-18 07:59:13 +00:00
kasperl@chromium.org
43d68a5886 Make sure to treat tests that time out as having the
TIMEOUT outcome.
Review URL: http://codereview.chromium.org/125248

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2205 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 12:19:51 +00:00
mikhail.naganov@gmail.com
4ca9836bc7 Include weak symbols from 'nm' report. This fixes "C++" part of profiling results.
Review URL: http://codereview.chromium.org/125243


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 08:27:19 +00:00
mikhail.naganov@gmail.com
2cc6fef9d5 Fix the problem with JS entries in tickprocessor.
The main problem was due to the following: after Erik had fixed the logger to report library addresses, tickprocessor started to add to the code map entries that covered almost entire memory. This happened because tickprocessor contains a heuristic to bias addresses of functions from dynamic libraries:

    if (funcInfo.start < libStart && funcInfo.start < libEnd - libStart) {
      funcInfo.start += libStart;
    }

And, as tickprocessor tried to process all symbols from the library, including data entries, which can be outside reported library addresses range, the second condition failed, and funcInfo.start remained unbiased.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 18:57:26 +00:00
erik.corry@gmail.com
398c5a9b37 Use >>> instead of >> in order to cover the full 32 bit range when
handling addresses.
Review URL: http://codereview.chromium.org/125187

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 15:01:24 +00:00
erik.corry@gmail.com
92bbf75971 Don't panic if tickprocessor can't find a shared library.
Don't swallow exceptions so we can't see where they are really
thrown.
Review URL: http://codereview.chromium.org/126200

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2192 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 13:44:48 +00:00
sgjesse@chromium.org
78a8cdfbe8 Added utility scripts for running oprofile in tools/oprofile.
To profile running the JavaScript file test.js using the V8 release mode shell (assuming it is build passing prof=oprofile to the SCons build). The following commands can be used:

$ tools/oprofile/start
$ tools/oprofile/run test.js
$ tools/oprofile/report | less
$ tools/oprofile/annotate | less
$ tools/oprofile/shutdown

Here is a summary of the commands.

For all the commands taking an executable the executable is expected to be a binary using V8. If no executable is specified the release mode V8 shell is assumed.

By default the --session-dir=/tmp/oprofv8 is passed to all oprofile commands. This walue can be changed by setting environment variable OPROFILE_SESSION_DIR.

When using the defaulf executable (V8 shell in release mode) it is assumed to be located in ../.. relative from the oprofile utility scripts. This default location can be overridden using the V8_SHELL_DIR environment variable.

start
-----
Start the oprofiling daemon.

run [executable] [parameters]
-----------------------------
Profile a V8 executable. Running this will reset oprofile samples, run the command and do an oprofile dump to flush samples and write ELF binaries for the generated code. The parameters are passed to the executable together with the --oprofile option.

report [executable] [parameters]
--------------------------------
Print the report for a profile run. The parameters are passed to opreport. E.g report --callgraph.

annotate [executable] [parameters]
----------------------------------
Print annotated assembly for a profile run. The parameters are passed to opannotate. E.g annotate -threshold 1.

reset
-----
Reset oprofile samples.

dump
----
Flush oprofile samples and write ELF binaries for the generated code.

shutdown
--------
Shutdown oprofile daemon.

Added a warning which is printed if option --oprofile is passed to a V8 which has not been compiled with oprofile support.
Review URL: http://codereview.chromium.org/125181

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 12:08:59 +00:00