MCPcopy Index your code
hub / github.com/nodejs/node / output_words

Method output_words

deps/v8/tools/grokdump.py:3229–3320  ·  view source on GitHub ↗
(self, f, start_address, end_address, highlight_address, desc,
                   size)

Source from the content-addressed store, hash-verified

3227 return
3228
3229 def output_words(self, f, start_address, end_address, highlight_address, desc,
3230 size):
3231 region = self.reader.FindRegion(highlight_address)
3232 if region is None:
3233 f.write("<h3>Address 0x%x not found in the dump.</h3>" %
3234 (highlight_address))
3235 return
3236 start_address = self.align_down(start_address, size)
3237 low = self.align_down(region[0], size)
3238 high = self.align_up(region[0] + region[1], size)
3239 if start_address < low:
3240 start_address = low
3241 end_address = self.align_up(end_address, size)
3242 if end_address > high:
3243 end_address = high
3244
3245 expand = ""
3246 if start_address != low or end_address != high:
3247 additional_query = ""
3248 if self.heap.IsPointerCompressed(
3249 ) and size == self.reader.TaggedPointerSize():
3250 additional_query = "&amp;type=tagged"
3251
3252 expand = ("(<a href=\"data.html?%s&amp;val=0x%x%s#highlight\">"
3253 " more..."
3254 " </a>)" %
3255 (self.encfilename, highlight_address, additional_query))
3256
3257 f.write("<h3>%s 0x%x - 0x%x, "
3258 "highlighting <a href=\"#highlight\">0x%x</a> %s</h3>" %
3259 (desc, start_address, end_address, highlight_address, expand))
3260 f.write('<div class="code">')
3261 f.write("<table class=codedump>")
3262
3263 for j in range(0, end_address - start_address, size):
3264 slot = start_address + j
3265 heap_object = ""
3266 maybe_address = None
3267 maybe_uncompressed_address = None
3268 end_region = region[0] + region[1]
3269 if slot < region[0] or slot + size > end_region:
3270 straddress = "0x"
3271 for i in range(end_region, slot + size):
3272 straddress += "??"
3273 for i in reversed(
3274 range(max(slot, region[0]), min(slot + size, end_region))):
3275 straddress += "%02x" % self.reader.ReadU8(i)
3276 for i in range(slot, region[0]):
3277 straddress += "??"
3278 else:
3279 maybe_address = self.reader.ReadSized(slot, size)
3280 if size == self.reader.MachinePointerSize():
3281 maybe_uncompressed_address = maybe_address
3282 else:
3283 maybe_uncompressed_address = (slot & (0xFFFFFFFF << 32)) | (
3284 maybe_address & 0xFFFFFFFF)
3285
3286 if size == self.reader.TaggedPointerSize():

Callers 3

output_summaryMethod · 0.95
output_dataMethod · 0.95
output_search_resMethod · 0.95

Calls 15

align_downMethod · 0.95
align_upMethod · 0.95
format_onheap_addressMethod · 0.95
format_objectMethod · 0.95
format_addressMethod · 0.95
output_comment_boxMethod · 0.95
td_from_addressMethod · 0.95
minFunction · 0.85
FindRegionMethod · 0.80
ReadU8Method · 0.80
ReadSizedMethod · 0.80
rangeFunction · 0.50

Tested by

no test coverage detected