Author: Maciej Fijalkowski <[email protected]>
Branch: vmprof
Changeset: r75542:23c533e6e79e
Date: 2015-01-26 19:52 +0200
http://bitbucket.org/pypy/pypy/changeset/23c533e6e79e/

Log:    fixes

diff --git a/pypy/module/_vmprof/src/get_custom_offset.c 
b/pypy/module/_vmprof/src/get_custom_offset.c
--- a/pypy/module/_vmprof/src/get_custom_offset.c
+++ b/pypy/module/_vmprof/src/get_custom_offset.c
@@ -2,34 +2,35 @@
 long pypy_jit_start_addr();
 long pypy_jit_end_addr();
 long pypy_jit_stack_depth_at_loc(long);
-long find_codemap_at_addr(long);
-long yield_bytecode_at_addr(long, long, long*);
+long pypy_find_codemap_at_addr(long);
+long pypy_yield_bytecode_at_addr(long, long, long*);
 
 static ptrdiff_t vmprof_unw_get_custom_offset(void* ip) {
-       long ip_l = (long)ip;
+       intptr_t ip_l = (intptr_t)ip;
 
-       if (ip < pypy_jit_start_addr() || ip > pypy_jit_end_addr()) {
+       if (ip_l < pypy_jit_start_addr() || ip_l > pypy_jit_end_addr()) {
                return -1;
        }
-       return pypy_jit_stack_depth_at_loc(ip);
+       return (void*)pypy_jit_stack_depth_at_loc(ip_l);
 }
 
 static long vmprof_write_header_for_jit_addr(void **result, long n,
-                                                                               
         intptr_t addr, int max_depth)
+                                                                               
         void *ip, int max_depth)
 {
        long codemap_pos;
        long current_pos = 0;
        intptr_t id;
+       intptr_t addr = (intptr_t)ip;
 
        if (addr < pypy_jit_start_addr() || addr > pypy_jit_end_addr()) {
                return n;
        }
-       codemap_pos = find_codemap_at_addr(addr);
+       codemap_pos = pypy_find_codemap_at_addr(addr);
        if (codemap_pos == -1) {
                return n;
        }
        while (1) {
-               id = yield_bytecode_at_addr(codemap_pos, addr, &current_pos);
+               id = pypy_yield_bytecode_at_addr(codemap_pos, addr, 
&current_pos);
                if (id == 0) {
                        return n;
                }
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to