Commit 150cc3fc authored by vitalyr@chromium.org's avatar vitalyr@chromium.org

ll_prof: Terminate mmap file names on the first NUL char.

R=fschneider@chromium.org

Review URL: http://codereview.chromium.org/7282011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 90c9f1b9
......@@ -631,10 +631,10 @@ class TraceReader(object):
def ReadMmap(self, header, offset):
mmap_info = PERF_MMAP_EVENT_BODY_DESC.Read(self.trace,
offset + self.header_size)
# Read null-padded filename.
# Read null-terminated filename.
filename = self.trace[offset + self.header_size + ctypes.sizeof(mmap_info):
offset + header.size].rstrip(chr(0))
mmap_info.filename = filename
offset + header.size]
mmap_info.filename = filename[:filename.find(chr(0))]
return mmap_info
def ReadSample(self, header, offset):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment