Skip to content

Commit

Permalink
revert changes made to vmprof_register_virtual_function
Browse files Browse the repository at this point in the history
  • Loading branch information
planrich committed Apr 25, 2017
1 parent 1acfdf0 commit 5f19393
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/_vmprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static int emit_code_object(PyCodeObject *co)
if (sz > MAX_FUNC_NAME / 2) sz = MAX_FUNC_NAME / 2;
snprintf(buf + sz, MAX_FUNC_NAME / 2, ":%d:%s", co_firstlineno,
co_filename);
return vmprof_register_virtual_function(buf, CODE_ADDR_TO_UID(co), 500);
return vmprof_register_virtual_function(buf, CODE_ADDR_TO_UID(co), 500000);
}

static int _look_for_code_object(PyObject *o, void *all_codes)
Expand Down
2 changes: 0 additions & 2 deletions src/vmprof_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,6 @@ int vmprof_register_virtual_function(char *code_name, intptr_t code_uid,
if (!__sync_bool_compare_and_swap(&current_codes, NULL, p)) {
/* failed, flush it */
commit_buffer(vmp_profile_fileno(), p);
} else {
cancel_buffer(p);
}
return 0;
}
Expand Down
2 changes: 2 additions & 0 deletions vmprof/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ def read_all(self):

while True:
marker = fileobj.read(1)
if fileobj.tell() == 0x0006bd74 + 8 + 1:
import pdb; pdb.set_trace()
if marker == MARKER_HEADER:
assert not s.version, "multiple headers"
self.read_header()
Expand Down

0 comments on commit 5f19393

Please sign in to comment.