MCPcopy Create free account
hub / github.com/nodejs/node / _LoadKernelSymbols

Method _LoadKernelSymbols

deps/v8/tools/profiling/ll_prof.py:806–822  ·  view source on GitHub ↗
(self, code_map)

Source from the content-addressed store, hash-verified

804 return name
805
806 def _LoadKernelSymbols(self, code_map):
807 if not os.path.exists(KERNEL_ALLSYMS_FILE):
808 print("Warning: %s not found" % KERNEL_ALLSYMS_FILE, file=sys.stderr)
809 return False
810 kallsyms = open(KERNEL_ALLSYMS_FILE, "r")
811 code = None
812 for line in kallsyms:
813 match = KERNEL_ALLSYMS_LINE_RE.match(line)
814 if match:
815 start_address = int(match.group(1), 16)
816 end_address = start_address
817 name = match.group(2)
818 if code:
819 code.end_address = start_address
820 code_map.Add(code, 16)
821 code = Code(name, start_address, end_address, "kernel", 0)
822 return True
823
824
825def PrintReport(code_map, library_repo, arch, ticks, options):

Callers 1

LoadMethod · 0.95

Calls 7

intFunction · 0.85
CodeClass · 0.70
matchMethod · 0.65
printFunction · 0.50
openFunction · 0.50
existsMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected