OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 | 7 |
8 <link rel="import" href="/tracing/extras/importer/etw/parser.html"> | 8 <link rel="import" href="/tracing/extras/importer/etw/parser.html"> |
9 | 9 |
10 <script> | 10 <script> |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 // Register handlers. | 31 // Register handlers. |
32 importer.registerEventHandler(guid, kEventTraceHeaderOpcode, | 32 importer.registerEventHandler(guid, kEventTraceHeaderOpcode, |
33 EventTraceParser.prototype.decodeHeader.bind(this)); | 33 EventTraceParser.prototype.decodeHeader.bind(this)); |
34 } | 34 } |
35 | 35 |
36 EventTraceParser.prototype = { | 36 EventTraceParser.prototype = { |
37 __proto__: Parser.prototype, | 37 __proto__: Parser.prototype, |
38 | 38 |
39 decodeFields: function(header, decoder) { | 39 decodeFields: function(header, decoder) { |
40 if (header.version != 2) | 40 if (header.version !== 2) |
41 throw new Error('Incompatible EventTrace event version.'); | 41 throw new Error('Incompatible EventTrace event version.'); |
42 | 42 |
43 var bufferSize = decoder.decodeUInt32(); | 43 var bufferSize = decoder.decodeUInt32(); |
44 var version = decoder.decodeUInt32(); | 44 var version = decoder.decodeUInt32(); |
45 var providerVersion = decoder.decodeUInt32(); | 45 var providerVersion = decoder.decodeUInt32(); |
46 var numberOfProcessors = decoder.decodeUInt32(); | 46 var numberOfProcessors = decoder.decodeUInt32(); |
47 var endTime = decoder.decodeUInt64ToString(); | 47 var endTime = decoder.decodeUInt64ToString(); |
48 var timerResolution = decoder.decodeUInt32(); | 48 var timerResolution = decoder.decodeUInt32(); |
49 var maxFileSize = decoder.decodeUInt32(); | 49 var maxFileSize = decoder.decodeUInt32(); |
50 var logFileMode = decoder.decodeUInt32(); | 50 var logFileMode = decoder.decodeUInt32(); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 }; | 101 }; |
102 | 102 |
103 Parser.register(EventTraceParser); | 103 Parser.register(EventTraceParser); |
104 | 104 |
105 return { | 105 return { |
106 EventTraceParser: EventTraceParser | 106 EventTraceParser: EventTraceParser |
107 }; | 107 }; |
108 }); | 108 }); |
109 </script> | 109 </script> |
110 | 110 |
OLD | NEW |