Author: Richard Plangger <[email protected]>
Branch: vmprof-native
Changeset: r90088:254b4656b2e4
Date: 2017-02-13 15:32 +0100
http://bitbucket.org/pypy/pypy/changeset/254b4656b2e4/

Log:    remove static declaration

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
@@ -95,13 +95,21 @@
         char interp_name[259];
     } header;
 
+    const char * machine;
+
+    machine = vmp_machine_os_name();
+
     size_t namelen = strnlen(interp_name, 255);
 
     header.hdr[0] = 0;
     header.hdr[1] = 3;
     header.hdr[2] = 0;
     header.hdr[3] = prepare_interval_usec;
-    header.hdr[4] = 0;
+    if (strstr(machine, "win") != 0) {
+        header.hdr[4] = 1;
+    } else {
+        header.hdr[4] = 0;
+    }
     header.interp_name[0] = MARKER_HEADER;
     header.interp_name[1] = '\x00';
     header.interp_name[2] = VERSION_TIMESTAMP;
@@ -122,7 +130,7 @@
     (void)vmp_write_time_now(MARKER_TIME_N_ZONE);
 
     /* write some more meta information */
-    vmp_write_meta("os", vmp_machine_os_name());
+    vmp_write_meta("os", machine);
     bits = vmp_machine_bits();
     if (bits == 64) {
         vmp_write_meta("bits", "64");
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
@@ -89,7 +89,7 @@
  * *************************************************************
  */
 
-static int get_stack_trace(PY_THREAD_STATE_T * current, void** result, int 
max_depth, intptr_t pc)
+int get_stack_trace(PY_THREAD_STATE_T * current, void** result, int max_depth, 
intptr_t pc)
 {
     PY_STACK_FRAME_T * frame;
 #ifdef RPYTHON_VMPROF
@@ -119,7 +119,7 @@
     longjmp(restore_point, SIGSEGV);
 }
 
-static int _vmprof_sample_stack(struct profbuf_s *p, PY_THREAD_STATE_T * 
tstate, ucontext_t * uc)
+int _vmprof_sample_stack(struct profbuf_s *p, PY_THREAD_STATE_T * tstate, 
ucontext_t * uc)
 {
     int depth;
     struct prof_stacktrace_s *st = (struct prof_stacktrace_s *)p->data;
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to