Author: Richard Plangger <planri...@gmail.com> Branch: vmprof-native Changeset: r90030:519dbbf54f3d Date: 2017-02-10 11:00 +0100 http://bitbucket.org/pypy/pypy/changeset/519dbbf54f3d/
Log: rename variable because term.h defines the same macro (insane to call a define "lines" if you ask me), change key while walking gcroots diff --git a/rpython/rlib/rvmprof/rvmprof.py b/rpython/rlib/rvmprof/rvmprof.py --- a/rpython/rlib/rvmprof/rvmprof.py +++ b/rpython/rlib/rvmprof/rvmprof.py @@ -1,6 +1,5 @@ import sys, os -from rpython.rlib.objectmodel import (specialize, we_are_translated, - not_rpython, we_are_translated_to_c) +from rpython.rlib.objectmodel import specialize, we_are_translated, not_rpython from rpython.rlib import jit, rposix, rgc from rpython.rlib.rvmprof import cintf from rpython.rtyper.annlowlevel import cast_instance_to_gcref diff --git a/rpython/rlib/rvmprof/src/rvmprof.c b/rpython/rlib/rvmprof/src/rvmprof.c --- a/rpython/rlib/rvmprof/src/rvmprof.c +++ b/rpython/rlib/rvmprof/src/rvmprof.c @@ -10,6 +10,8 @@ # include "rvmprof.h" #endif + + #include "shared/vmprof_get_custom_offset.h" #ifdef VMPROF_UNIX #include "shared/vmprof_main.h" diff --git a/rpython/rlib/rvmprof/src/shared/vmp_stack.h b/rpython/rlib/rvmprof/src/shared/vmp_stack.h --- a/rpython/rlib/rvmprof/src/shared/vmp_stack.h +++ b/rpython/rlib/rvmprof/src/shared/vmp_stack.h @@ -10,7 +10,7 @@ int vmp_ignore_ip(intptr_t ip); int vmp_binary_search_ranges(intptr_t ip, intptr_t * l, int count); int vmp_native_symbols_read(void); -void vmp_profile_lines(int lines); +void vmp_profile_lines(int); int vmp_profiles_python_lines(void); int vmp_ignore_symbol_count(void); diff --git a/rpython/rlib/rvmprof/src/shared/vmprof_common.h b/rpython/rlib/rvmprof/src/shared/vmprof_common.h --- a/rpython/rlib/rvmprof/src/shared/vmprof_common.h +++ b/rpython/rlib/rvmprof/src/shared/vmprof_common.h @@ -17,7 +17,7 @@ static long prepare_interval_usec = 0; static long profile_interval_usec = 0; -static int opened_profile(const char *interp_name, int memory, int lines, int native); +static int opened_profile(const char *interp_name, int memory, int proflines, int native); #ifdef VMPROF_UNIX static struct profbuf_s *volatile current_codes; @@ -58,7 +58,7 @@ RPY_EXTERN char *vmprof_init(int fd, double interval, int memory, - int lines, const char *interp_name, int native) + int proflines, const char *interp_name, int native) { if (!(interval >= 1e-6 && interval < 1.0)) { /* also if it is NaN */ return "bad value for 'interval'"; @@ -79,14 +79,14 @@ #endif assert(fd >= 0); vmp_set_profile_fileno(fd); - if (opened_profile(interp_name, memory, lines, native) < 0) { + if (opened_profile(interp_name, memory, proflines, native) < 0) { vmp_set_profile_fileno(0); return strerror(errno); } return NULL; } -static int opened_profile(const char *interp_name, int memory, int lines, int native) +static int opened_profile(const char *interp_name, int memory, int proflines, int native) { int success; int bits; @@ -105,7 +105,7 @@ header.interp_name[0] = MARKER_HEADER; header.interp_name[1] = '\x00'; header.interp_name[2] = VERSION_TIMESTAMP; - header.interp_name[3] = memory*PROFILE_MEMORY + lines*PROFILE_LINES + \ + header.interp_name[3] = memory*PROFILE_MEMORY + proflines*PROFILE_LINES + \ native*PROFILE_NATIVE; #ifdef RPYTHON_VMPROF header.interp_name[3] += PROFILE_RPYTHON; diff --git a/rpython/rlib/rvmprof/src/shared/vmprof_main.h b/rpython/rlib/rvmprof/src/shared/vmprof_main.h --- a/rpython/rlib/rvmprof/src/shared/vmprof_main.h +++ b/rpython/rlib/rvmprof/src/shared/vmprof_main.h @@ -51,7 +51,7 @@ /************************************************************/ static void *(*mainloop_get_virtual_ip)(char *) = 0; -static int opened_profile(const char *interp_name, int memory, int lines, int native); +static int opened_profile(const char *interp_name, int memory, int proflines, int native); static void flush_codes(void); /************************************************************/ diff --git a/rpython/translator/c/gcc/trackgcroot.py b/rpython/translator/c/gcc/trackgcroot.py --- a/rpython/translator/c/gcc/trackgcroot.py +++ b/rpython/translator/c/gcc/trackgcroot.py @@ -368,8 +368,8 @@ def schedule(insn, state): for previnsn in insn.previous_insns: key = previnsn, state - if key not in seen: - seen.add(key) + if previnsn not in seen: + seen.add(previnsn) pending.append(key) schedule(initial_insn, initial_state) while pending: _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit