v8.log分析出来的结果,如何解释呢?跪请懂得入帮忙说两句
发布于 10 年前 作者 dongxie 5093 次浏览 最后一次编辑是 8 年前 来自 问答

有些东西完全卡不懂,不知道哪里是什么意思,敬请指明两三条关键的意思(内容太长,我截取了每个项目靠前的几行)。

Code move event for unknown code: 0x3f5ed8208e60
Statistical profiling result from v8.log, (53903469 ticks, 94 unaccounted, 0 excluded).

 [Unknown]:
   ticks  total  nonlib   name
     94    0.0%

 [Shared libraries]:
   ticks  total  nonlib   name
  51661492   95.8%    0.0%  /lib64/libc-2.12.so
  917328    1.7%    0.0%  /usr/lib64/libv8.so.3.14.5
  274401    0.5%    0.0%  /lib64/libpthread-2.12.so
  56317    0.1%    0.0%  /usr/bin/node
 

 [JavaScript]:
   ticks  total  nonlib   name
  463447    0.9%   48.6%  LazyCompile: *exports._unrefActive timers.js:440
  20906    0.0%    2.2%  LazyCompile: *Socket._write net.js:619
  20324    0.0%    2.1%  LazyCompile: *Writable.write _stream_writable.js:162
  18886    0.0%    2.0%  LazyCompile: *append _linklist.js:63
  18276    0.0%    1.9%  LazyCompile: *remove _linklist.js:47
  10186    0.0%    1.1%  LazyCompile: *emit events.js:53
  10047    0.0%    1.1%  LazyCompile: *onwrite _stream_writable.js:248
   9873    0.0%    1.0%  KeyedLoadIC: A keyed load IC from the snapshot {1}
   8424    0.0%    0.9%  LazyCompile: *_nextTick node.js:479
   7735    0.0%    0.8%  LazyCompile: p.encodeInt /home/node21/net/node-amf/bin.js:53
   7296    0.0%    0.8%  Stub: StringAddStub
   7198    0.0%    0.8%  Builtin: A builtin from the snapshot {1}
   6321    0.0%    0.7%  LazyCompile: onread net.js:496
   5708    0.0%    0.6%  LazyCompile: *ChatPipe.sendBytes /home/node21/net/chat/ChatPipe.js:343
   5613    0.0%    0.6%  LazyCompile: Dictionary.each /home/node21/base/Dict.js:84
   5518    0.0%    0.6%  Stub: CallFunctionStub_Args0
   5334    0.0%    0.6%  LazyCompile: *Buffer buffer.js:156
   5163    0.0%    0.5%  LazyCompile: *Socket.write net.js:612
  

 [C++]:
   ticks  total  nonlib   name

 [GC]:
   ticks  total  nonlib   name
  95380    0.2%

 [Bottom up (heavy) profile]:
  Note: percentage shows a share of a particular caller in the total
  amount of its parent calls.
  Callers occupying less than 2.0% are not shown.

   ticks parent  name
  51661492   95.8%  /lib64/libc-2.12.so


 [Top down (heavy) profile]:
  Note: callees occupying less than 0.1% are not shown.

  inclusive      self           name
  ticks   total  ticks   total
  51620474   95.8%  51620474   95.8%  /lib64/libc-2.12.so

  1580415    2.9%   6321    0.0%  LazyCompile: onread net.js:496
  1421489    2.6%    710    0.0%    LazyCompile: *Readable.push _stream_readable.js:116
  1420357    2.6%   2339    0.0%      LazyCompile: *readableAddChunk _stream_readable.js:136
  1409497    2.6%    485    0.0%        LazyCompile: *emitReadable _stream_readable.js:410
  1408141    2.6%    694    0.0%          LazyCompile: *emitReadable_ _stream_readable.js:425
  1406787    2.6%   2711    0.0%            LazyCompile: *emit events.js:53
  1365271    2.5%   1470    0.0%              LazyCompile: *<anonymous> _stream_readable.js:759
  1349438    2.5%    448    0.0%                LazyCompile: *emit events.js:53
  1122331    2.1%    189    0.0%                  LazyCompile: b native v8natives.js:1582
  1116406    2.1%     89    0.0%                    LazyCompile: *onData /home/node21/net/chat/ChatPipe.js:104
  993799    1.8%    104    0.0%                      LazyCompile: *put /home/node21/net/GLBuffer.js:82
  990933    1.8%   1870    0.0%                        LazyCompile: proc /home/node21/net/GLBuffer.js:129
  982671    1.8%    779    0.0%                          LazyCompile: *emit events.js:53
  976041    1.8%    114    0.0%                            LazyCompile: b native v8natives.js:1582
  974665    1.8%   1918    0.0%                              LazyCompile: ChatPipe.onReceivePackData /home/node21/net/chat/ChatPipe.js:124
  663748    1.2%    632    0.0%                                LazyCompile: ~ChatPipe.CHAT_CHANGE_INFO /home/node21/net/chat/ChatPipe.js:273
  652600    1.2%     44    0.0%                                  LazyCompile: *ChatPipe.sendAll /home/node21/net/chat/ChatPipe.js:437
  632741    1.2%   4051    0.0%                                    LazyCompile: Dictionary.each /home/node21/base/Dict.js:84
  603232    1.1%   2985    0.0%                                      LazyCompile: *<anonymous> /home/node21/net/chat/ChatPipe.js:440
  596431    1.1%   4166    0.0%                                        LazyCompile: *ChatPipe.sendBytes /home/node21/net/chat/ChatPipe.js:343
  591471    1.1%   3106    0.0%                                          LazyCompile: *Socket.write net.js:612
  580448    1.1%  13092    0.0%                                            LazyCompile: *Writable.write _stream_writable.js:162
  556373    1.0%  12726    0.0%                                              LazyCompile: *Socket._write net.js:619
  255119    0.5%   2833    0.0%                                                LazyCompile: *createWriteReq net.js:658
  128272    0.2%  128272    0.2%                                                  /usr/lib64/libv8.so.3.14.5
  103480    0.2%  103480    0.2%                                                  /lib64/libpthread-2.12.so
  235758    0.4%  194003    0.4%                                                LazyCompile: *exports._unrefActive timers.js:440
  242571    0.5%   1560    0.0%                                LazyCompile: updateRecord /home/node21/net/chat/ChatDB.js:41
  129827    0.2%    236    0.0%                                  LazyCompile: *newQuery /home/node21/net/chat/ChatDB.js:167
  129267    0.2%    379    0.0%                                    LazyCompile: *Pool.getConnection /home/node_modules/mysql/lib/Pool.js:22
  127070    0.2%    672    0.0%                                      LazyCompile: *acquireConnection /home/node_modules/mysql/lib/Pool.js:72
  125737    0.2%    516    0.0%                                        LazyCompile: *ping /home/node_modules/mysql/lib/Connection.js:188
  125137    0.2%    278    0.0%                                          LazyCompile: *ping /home/node_modules/mysql/lib/protocol/Protocol.js:63
  119761    0.2%   1527    0.0%                                            LazyCompile: *Protocol._enqueue /home/node_modules/mysql/lib/protocol/Protocol.js:128
  70898    0.1%    727    0.0%                                              LazyCompile: *Protocol._startSequence /home/node_modules/mysql/lib/protocol/Protocol.js:337
  92510    0.2%      5    0.0%                      LazyCompile: ~put /home/node21/net/GLBuffer.js:82
  92262    0.2%    137    0.0%                        LazyCompile: proc /home/node21/net/GLBuffer.js:129
  91580    0.2%     63    0.0%                          LazyCompile: *emit events.js:53
  90897    0.2%     12    0.0%                            LazyCompile: b native v8natives.js:1582
  90767    0.2%    144    0.0%                              LazyCompile: ChatPipe.onReceivePackData /home/node21/net/chat/ChatPipe.js:124
  66410    0.1%     52    0.0%                                LazyCompile: ~ChatPipe.CHAT_CHANGE_INFO /home/node21/net/chat/ChatPipe.js:273
  65207    0.1%      9    0.0%                                  LazyCompile: *ChatPipe.sendAll /home/node21/net/chat/ChatPipe.js:437
  63369    0.1%    421    0.0%                                    LazyCompile: Dictionary.each /home/node21/base/Dict.js:84
  60536    0.1%    317    0.0%                                      LazyCompile: *<anonymous> /home/node21/net/chat/ChatPipe.js:440
  59816    0.1%    403    0.0%                                        LazyCompile: *ChatPipe.sendBytes /home/node21/net/chat/ChatPipe.js:343
  59284    0.1%    330    0.0%                                          LazyCompile: *Socket.write net.js:612
  58658    0.1%   1197    0.0%                                            LazyCompile: *Writable.write _stream_writable.js:162
  56834    0.1%   1197    0.0%                                              LazyCompile: *Socket._write net.js:619
  54226    0.1%  46231    0.1%    LazyCompile: *exports._unrefActive timers.js:440

  245674    0.5%     37    0.0%  LazyCompile: listOnTimeout timers.js:79
  245319    0.5%     15    0.0%    LazyCompile: ~callbackWrapper /home/node21/node_modules/cron/lib/cron.js:379
  223361    0.4%      2    0.0%      LazyCompile: *CronJob.onTick /home/node21/app.js:52
  223358    0.4%      7    0.0%        LazyCompile: *self.checkOnlineSendQueue /home/node21/net/chat/ChatOnlineList.js:23
  192589    0.4%      2    0.0%          LazyCompile: *NDataPack /home/node21/net/chat/NDataPack.js:14
  154384    0.3%      0    0.0%            LazyCompile: *NDataObject.writeExternal /home/node21/net/DataTypeDefine.js:25
  154367    0.3%    122    0.0%              LazyCompile: NDataObject.writeSingle /home/node21/net/DataTypeDefine.js:90
  153798    0.3%    910    0.0%                LazyCompile: NDataObject.writeSingle /home/node21/net/DataTypeDefine.js:90
  152271    0.3%   1575    0.0%                  LazyCompile: *NDataObject.writeExternal /home/node21/net/DataTypeDefine.js:25
  150033    0.3%    493    0.0%                    LazyCompile: NDataObject.writeSingle /home/node21/net/DataTypeDefine.js:90
  140222    0.3%    441    0.0%                      LazyCompile: amf3Object /home/node21/net/ByteBuffer.js:52
  136819    0.3%   2281    0.0%                        LazyCompile: AMFSerializer.writeObject /home/node21/net/node-amf/serialize.js:217
  80006    0.1%    709    0.0%                          LazyCompile: *AMFSerializer.writeValue /home/node21/net/node-amf/serialize.js:89

  163153    0.3%  163153    0.3%  /usr/lib64/libv8.so.3.14.5

  125439    0.2%   3790    0.0%  LazyCompile: *afterWrite net.js:706
  104488    0.2%  88314    0.2%    LazyCompile: *exports._unrefActive timers.js:440

  67495    0.1%   2776    0.0%  LazyCompile: afterWrite net.js:706
  60000    0.1%  51685    0.1%    LazyCompile: *exports._unrefActive timers.js:440
2 回复

自己顶

目前把一些.each(function(){})类似的函数改写为临时函数,有升有降,总体还升,继续检测中

回到顶部