diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-02-19 10:29:41 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-02-19 10:40:48 -0800 |
commit | bcf163da27676e26108ec430a392baee84f2831c (patch) | |
tree | 1afc6af6d5b53247b25ecb9f2f14f88c9fd532f5 /deps/v8/tools | |
parent | 764783560ed8d2cd523e715567938f2c3afbb8d0 (diff) | |
download | node-new-bcf163da27676e26108ec430a392baee84f2831c.tar.gz |
Upgrade V8 to 2.1.1
Diffstat (limited to 'deps/v8/tools')
-rw-r--r-- | deps/v8/tools/gyp/v8.gyp | 3 | ||||
-rw-r--r-- | deps/v8/tools/linux-tick-processor | 11 | ||||
-rw-r--r-- | deps/v8/tools/logreader.js | 45 | ||||
-rw-r--r-- | deps/v8/tools/tickprocessor.js | 13 | ||||
-rw-r--r-- | deps/v8/tools/visual_studio/v8_base.vcproj | 12 | ||||
-rw-r--r-- | deps/v8/tools/visual_studio/v8_base_arm.vcproj | 12 | ||||
-rw-r--r-- | deps/v8/tools/visual_studio/v8_base_x64.vcproj | 12 | ||||
-rw-r--r-- | deps/v8/tools/windows-tick-processor.bat | 26 |
8 files changed, 118 insertions, 16 deletions
diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp index f2d1b98eee..9fea73ce8c 100644 --- a/deps/v8/tools/gyp/v8.gyp +++ b/deps/v8/tools/gyp/v8.gyp @@ -308,6 +308,8 @@ '../../src/jsregexp.h', '../../src/list-inl.h', '../../src/list.h', + '../../src/liveedit.cc', + '../../src/liveedit.h', '../../src/log-inl.h', '../../src/log-utils.cc', '../../src/log-utils.h', @@ -320,6 +322,7 @@ '../../src/messages.cc', '../../src/messages.h', '../../src/natives.h', + '../../src/number-info.h', '../../src/objects-debug.cc', '../../src/objects-inl.h', '../../src/objects.cc', diff --git a/deps/v8/tools/linux-tick-processor b/deps/v8/tools/linux-tick-processor index ca1c721264..17157050df 100644 --- a/deps/v8/tools/linux-tick-processor +++ b/deps/v8/tools/linux-tick-processor @@ -16,8 +16,17 @@ else [ -x $d8_exec ] || scons -j4 -C $D8_PATH -Y $tools_path/.. d8 fi +# find the name of the log file to process, it must not start with a dash. +log_file="v8.log" +for arg in "$@" +do + if [[ "${arg}" != -* ]]; then + log_file=${arg} + fi +done + # nm spits out 'no symbols found' messages to stderr. -$d8_exec $tools_path/splaytree.js $tools_path/codemap.js \ +cat $log_file | $d8_exec $tools_path/splaytree.js $tools_path/codemap.js \ $tools_path/csvparser.js $tools_path/consarray.js \ $tools_path/profile.js $tools_path/profile_view.js \ $tools_path/logreader.js $tools_path/tickprocessor.js \ diff --git a/deps/v8/tools/logreader.js b/deps/v8/tools/logreader.js index 20a1f54444..b2aca73d21 100644 --- a/deps/v8/tools/logreader.js +++ b/deps/v8/tools/logreader.js @@ -76,6 +76,18 @@ devtools.profiler.LogReader = function(dispatchTable) { * @type {Array.<string>} */ this.backRefs_ = []; + + /** + * Current line. + * @type {number} + */ + this.lineNum_ = 0; + + /** + * CSV lines parser. + * @type {devtools.profiler.CsvParser} + */ + this.csvParser_ = new devtools.profiler.CsvParser(); }; @@ -136,6 +148,16 @@ devtools.profiler.LogReader.prototype.processLogChunk = function(chunk) { /** + * Processes a line of V8 profiler event log. + * + * @param {string} line A line of log. + */ +devtools.profiler.LogReader.prototype.processLogLine = function(line) { + this.processLog_([line]); +}; + + +/** * Processes stack record. * * @param {number} pc Program counter. @@ -280,25 +302,20 @@ devtools.profiler.LogReader.prototype.processAlias_ = function( * @private */ devtools.profiler.LogReader.prototype.processLog_ = function(lines) { - var csvParser = new devtools.profiler.CsvParser(); - try { - for (var i = 0, n = lines.length; i < n; ++i) { - var line = lines[i]; - if (!line) { - continue; - } + for (var i = 0, n = lines.length; i < n; ++i, ++this.lineNum_) { + var line = lines[i]; + if (!line) { + continue; + } + try { if (line.charAt(0) == '#' || line.substr(0, line.indexOf(',')) in this.backRefsCommands_) { line = this.expandBackRef_(line); } - var fields = csvParser.parseLine(line); + var fields = this.csvParser_.parseLine(line); this.dispatchLogRow_(fields); - } - } catch (e) { - // An error on the last line is acceptable since log file can be truncated. - if (i < n - 1) { - this.printError('line ' + (i + 1) + ': ' + (e.message || e)); - throw e; + } catch (e) { + this.printError('line ' + (this.lineNum_ + 1) + ': ' + (e.message || e)); } } }; diff --git a/deps/v8/tools/tickprocessor.js b/deps/v8/tools/tickprocessor.js index 35422e2ecb..a3e14c3ae5 100644 --- a/deps/v8/tools/tickprocessor.js +++ b/deps/v8/tools/tickprocessor.js @@ -67,6 +67,9 @@ function SnapshotLogProcessor() { processor: this.processCodeMove, backrefs: true }, 'code-delete': { parsers: [this.createAddressParser('code')], processor: this.processCodeDelete, backrefs: true }, + 'function-creation': null, + 'function-move': null, + 'function-delete': null, 'snapshot-pos': { parsers: [this.createAddressParser('code'), parseInt], processor: this.processSnapshotPosition, backrefs: true }}); @@ -259,6 +262,16 @@ TickProcessor.prototype.isJsCode = function(name) { TickProcessor.prototype.processLogFile = function(fileName) { this.lastLogFileName_ = fileName; + var line; + while (line = readline()) { + this.processLogLine(line); + } +}; + + +TickProcessor.prototype.processLogFileInTest = function(fileName) { + // Hack file name to avoid dealing with platform specifics. + this.lastLogFileName_ = 'v8.log'; var contents = readFile(fileName); this.processLogChunk(contents); }; diff --git a/deps/v8/tools/visual_studio/v8_base.vcproj b/deps/v8/tools/visual_studio/v8_base.vcproj index e58e8ff31f..fdb6cd0c66 100644 --- a/deps/v8/tools/visual_studio/v8_base.vcproj +++ b/deps/v8/tools/visual_studio/v8_base.vcproj @@ -577,6 +577,14 @@ > </File> <File + RelativePath="..\..\src\liveedit.cc" + > + </File> + <File + RelativePath="..\..\src\liveedit.h" + > + </File> + <File RelativePath="..\..\src\log.cc" > </File> @@ -633,6 +641,10 @@ > </File> <File + RelativePath="..\..\src\number-info.h" + > + </File> + <File RelativePath="..\..\src\objects-debug.cc" > <FileConfiguration diff --git a/deps/v8/tools/visual_studio/v8_base_arm.vcproj b/deps/v8/tools/visual_studio/v8_base_arm.vcproj index 4b37b538c2..2602be455f 100644 --- a/deps/v8/tools/visual_studio/v8_base_arm.vcproj +++ b/deps/v8/tools/visual_studio/v8_base_arm.vcproj @@ -581,6 +581,14 @@ > </File> <File + RelativePath="..\..\src\liveedit.cc" + > + </File> + <File + RelativePath="..\..\src\liveedit.h" + > + </File> + <File RelativePath="..\..\src\log.cc" > </File> @@ -637,6 +645,10 @@ > </File> <File + RelativePath="..\..\src\number-info.h" + > + </File> + <File RelativePath="..\..\src\objects-debug.cc" > <FileConfiguration diff --git a/deps/v8/tools/visual_studio/v8_base_x64.vcproj b/deps/v8/tools/visual_studio/v8_base_x64.vcproj index b6d5c7d828..d3f55c6a06 100644 --- a/deps/v8/tools/visual_studio/v8_base_x64.vcproj +++ b/deps/v8/tools/visual_studio/v8_base_x64.vcproj @@ -578,6 +578,14 @@ > </File> <File + RelativePath="..\..\src\liveedit.cc" + > + </File> + <File + RelativePath="..\..\src\liveedit.h" + > + </File> + <File RelativePath="..\..\src\log.cc" > </File> @@ -634,6 +642,10 @@ > </File> <File + RelativePath="..\..\src\number-info.h" + > + </File> + <File RelativePath="..\..\src\objects-debug.cc" > <FileConfiguration diff --git a/deps/v8/tools/windows-tick-processor.bat b/deps/v8/tools/windows-tick-processor.bat index 6743f68b3f..33b1f77052 100644 --- a/deps/v8/tools/windows-tick-processor.bat +++ b/deps/v8/tools/windows-tick-processor.bat @@ -2,4 +2,28 @@ SET tools_dir=%~dp0 -%tools_dir%..\d8 %tools_dir%splaytree.js %tools_dir%codemap.js %tools_dir%csvparser.js %tools_dir%consarray.js %tools_dir%profile.js %tools_dir%profile_view.js %tools_dir%logreader.js %tools_dir%tickprocessor.js %tools_dir%tickprocessor-driver.js -- --windows %* +SET log_file=v8.log + +rem find the name of the log file to process, it must not start with a dash. +rem we prepend cmdline args with a number (in fact, any letter or number) +rem to cope with empty arguments. +SET arg1=1%1 +IF NOT %arg1:~0,2% == 1 (IF NOT %arg1:~0,2% == 1- SET log_file=%1) +SET arg2=2%2 +IF NOT %arg2:~0,2% == 2 (IF NOT %arg2:~0,2% == 2- SET log_file=%2) +SET arg3=3%3 +IF NOT %arg3:~0,2% == 3 (IF NOT %arg3:~0,2% == 3- SET log_file=%3) +SET arg4=4%4 +IF NOT %arg4:~0,2% == 4 (IF NOT %arg4:~0,2% == 4- SET log_file=%4) +SET arg5=5%5 +IF NOT %arg5:~0,2% == 5 (IF NOT %arg5:~0,2% == 5- SET log_file=%5) +SET arg6=6%6 +IF NOT %arg6:~0,2% == 6 (IF NOT %arg6:~0,2% == 6- SET log_file=%6) +SET arg7=7%7 +IF NOT %arg7:~0,2% == 7 (IF NOT %arg7:~0,2% == 7- SET log_file=%7) +SET arg8=8%8 +IF NOT %arg8:~0,2% == 8 (IF NOT %arg8:~0,2% == 8- SET log_file=%8) +SET arg9=9%9 +IF NOT %arg9:~0,2% == 9 (IF NOT %arg9:~0,2% == 9- SET log_file=%9) + +type %log_file% | %tools_dir%..\d8 %tools_dir%splaytree.js %tools_dir%codemap.js %tools_dir%csvparser.js %tools_dir%consarray.js %tools_dir%profile.js %tools_dir%profile_view.js %tools_dir%logreader.js %tools_dir%tickprocessor.js %tools_dir%tickprocessor-driver.js -- --windows %* |