[pypy-commit] pypy vmprof: strip the topmost part of the code, with rationale

fijal noreply at buildbot.pypy.org
Mon Apr 6 15:32:16 CEST 2015


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: vmprof
Changeset: r76723:9efba357dd88
Date: 2015-04-06 15:22 +0200
http://bitbucket.org/pypy/pypy/changeset/9efba357dd88/

Log:	strip the topmost part of the code, with rationale

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
@@ -48,6 +48,12 @@
             break;
         result[n++] = (void *)id;
     }
+    // we strip the topmost part - the reason is that it's either
+    // represented in the jitted caller or it's not jitted (we have the
+    // same function essentially twice
+    if (n != max_depth) {
+        n--;
+    }
     k = 0;
     while (k < (n - start) / 2) {
         tmp = result[start + k];


More information about the pypy-commit mailing list