Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: tracing/tracing/extras/importer/etw/thread_parser.html

Issue 2390373003: Change all == to === and != to !== in trace viewer. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 var startAddr; 75 var startAddr;
76 var win32StartAddr; 76 var win32StartAddr;
77 var tebBase; 77 var tebBase;
78 var subProcessTag; 78 var subProcessTag;
79 var basePriority; 79 var basePriority;
80 var pagePriority; 80 var pagePriority;
81 var ioPriority; 81 var ioPriority;
82 var threadFlags; 82 var threadFlags;
83 var waitMode; 83 var waitMode;
84 84
85 if (header.version == 1) { 85 if (header.version === 1) {
86 // On version 1, only start events have extended information. 86 // On version 1, only start events have extended information.
87 if (header.opcode == kThreadStartOpcode || 87 if (header.opcode === kThreadStartOpcode ||
88 header.opcode == kThreadDCStartOpcode) { 88 header.opcode === kThreadDCStartOpcode) {
89 stackBase = decoder.decodeUInteger(header.is64); 89 stackBase = decoder.decodeUInteger(header.is64);
90 stackLimit = decoder.decodeUInteger(header.is64); 90 stackLimit = decoder.decodeUInteger(header.is64);
91 userStackBase = decoder.decodeUInteger(header.is64); 91 userStackBase = decoder.decodeUInteger(header.is64);
92 userStackLimit = decoder.decodeUInteger(header.is64); 92 userStackLimit = decoder.decodeUInteger(header.is64);
93 startAddr = decoder.decodeUInteger(header.is64); 93 startAddr = decoder.decodeUInteger(header.is64);
94 win32StartAddr = decoder.decodeUInteger(header.is64); 94 win32StartAddr = decoder.decodeUInteger(header.is64);
95 waitMode = decoder.decodeInt8(); 95 waitMode = decoder.decodeInt8();
96 decoder.skip(3); 96 decoder.skip(3);
97 } 97 }
98 } else { 98 } else {
99 stackBase = decoder.decodeUInteger(header.is64); 99 stackBase = decoder.decodeUInteger(header.is64);
100 stackLimit = decoder.decodeUInteger(header.is64); 100 stackLimit = decoder.decodeUInteger(header.is64);
101 userStackBase = decoder.decodeUInteger(header.is64); 101 userStackBase = decoder.decodeUInteger(header.is64);
102 userStackLimit = decoder.decodeUInteger(header.is64); 102 userStackLimit = decoder.decodeUInteger(header.is64);
103 103
104 // Version 2 produces a field named 'startAddr'. 104 // Version 2 produces a field named 'startAddr'.
105 if (header.version == 2) 105 if (header.version === 2)
106 startAddr = decoder.decodeUInteger(header.is64); 106 startAddr = decoder.decodeUInteger(header.is64);
107 else 107 else
108 affinity = decoder.decodeUInteger(header.is64); 108 affinity = decoder.decodeUInteger(header.is64);
109 109
110 win32StartAddr = decoder.decodeUInteger(header.is64); 110 win32StartAddr = decoder.decodeUInteger(header.is64);
111 tebBase = decoder.decodeUInteger(header.is64); 111 tebBase = decoder.decodeUInteger(header.is64);
112 subProcessTag = decoder.decodeUInt32(); 112 subProcessTag = decoder.decodeUInt32();
113 113
114 if (header.version == 3) { 114 if (header.version === 3) {
115 basePriority = decoder.decodeUInt8(); 115 basePriority = decoder.decodeUInt8();
116 pagePriority = decoder.decodeUInt8(); 116 pagePriority = decoder.decodeUInt8();
117 ioPriority = decoder.decodeUInt8(); 117 ioPriority = decoder.decodeUInt8();
118 threadFlags = decoder.decodeUInt8(); 118 threadFlags = decoder.decodeUInt8();
119 } 119 }
120 } 120 }
121 121
122 return { 122 return {
123 processId: processId, 123 processId: processId,
124 threadId: threadId, 124 threadId: threadId,
125 stackBase: stackBase, 125 stackBase: stackBase,
126 stackLimit: stackLimit, 126 stackLimit: stackLimit,
127 userStackBase: userStackBase, 127 userStackBase: userStackBase,
128 userStackLimit: userStackLimit, 128 userStackLimit: userStackLimit,
129 affinity: affinity, 129 affinity: affinity,
130 startAddr: startAddr, 130 startAddr: startAddr,
131 win32StartAddr: win32StartAddr, 131 win32StartAddr: win32StartAddr,
132 tebBase: tebBase, 132 tebBase: tebBase,
133 subProcessTag: subProcessTag, 133 subProcessTag: subProcessTag,
134 waitMode: waitMode, 134 waitMode: waitMode,
135 basePriority: basePriority, 135 basePriority: basePriority,
136 pagePriority: pagePriority, 136 pagePriority: pagePriority,
137 ioPriority: ioPriority, 137 ioPriority: ioPriority,
138 threadFlags: threadFlags 138 threadFlags: threadFlags
139 }; 139 };
140 }, 140 },
141 141
142 decodeCSwitchFields: function(header, decoder) { 142 decodeCSwitchFields: function(header, decoder) {
143 if (header.version != 2) 143 if (header.version !== 2)
144 throw new Error('Incompatible Thread event version.'); 144 throw new Error('Incompatible Thread event version.');
145 145
146 // Decode CSwitch payload. 146 // Decode CSwitch payload.
147 var newThreadId = decoder.decodeUInt32(); 147 var newThreadId = decoder.decodeUInt32();
148 var oldThreadId = decoder.decodeUInt32(); 148 var oldThreadId = decoder.decodeUInt32();
149 var newThreadPriority = decoder.decodeInt8(); 149 var newThreadPriority = decoder.decodeInt8();
150 var oldThreadPriority = decoder.decodeInt8(); 150 var oldThreadPriority = decoder.decodeInt8();
151 var previousCState = decoder.decodeUInt8(); 151 var previousCState = decoder.decodeUInt8();
152 var spareByte = decoder.decodeInt8(); 152 var spareByte = decoder.decodeInt8();
153 var oldThreadWaitReason = decoder.decodeInt8(); 153 var oldThreadWaitReason = decoder.decodeInt8();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 }; 234 };
235 235
236 Parser.register(ThreadParser); 236 Parser.register(ThreadParser);
237 237
238 return { 238 return {
239 ThreadParser: ThreadParser 239 ThreadParser: ThreadParser
240 }; 240 };
241 }); 241 });
242 </script> 242 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698