aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/runtime.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2016-10-14 13:36:35 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2016-10-14 13:36:35 +0000
commit238fc3441cecc5bdf982009c168d9f5b9085e8de (patch)
tree319b4c046950b68f79d46161f30121384b85c6be /libgo/runtime/runtime.h
parent6d59425df7e3d4e9b49c6521288a048bb35ec70c (diff)
downloadgcc-238fc3441cecc5bdf982009c168d9f5b9085e8de.zip
gcc-238fc3441cecc5bdf982009c168d9f5b9085e8de.tar.gz
gcc-238fc3441cecc5bdf982009c168d9f5b9085e8de.tar.bz2
runtime: copy cpuprof code from Go 1.7 runtime
This replaces runtime/cpuprof.goc with go/runtime/cpuprof.go and adjusts the supporting code in runtime/proc.c. This adds another case where the compiler needs to avoid heap allocation in the runtime package: when evaluating a method expression into a closure. Implementing this required moving the relevant code from do_get_backend to do_flatten, so that I could easily add a temporary variable. Doing that let me get rid of Bound_method_expression::do_lower. Reviewed-on: https://go-review.googlesource.com/31050 From-SVN: r241163
Diffstat (limited to 'libgo/runtime/runtime.h')
-rw-r--r--libgo/runtime/runtime.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h
index b7e5902..96f550c 100644
--- a/libgo/runtime/runtime.h
+++ b/libgo/runtime/runtime.h
@@ -417,7 +417,10 @@ void runtime_freezetheworld(void);
void runtime_unwindstack(G*, byte*);
void runtime_sigprof();
void runtime_resetcpuprofiler(int32);
-void runtime_setcpuprofilerate(void(*)(uintptr*, int32), int32);
+void runtime_setcpuprofilerate_m(int32)
+ __asm__ (GOSYM_PREFIX "runtime.setcpuprofilerate_m");
+void runtime_cpuprofAdd(Slice)
+ __asm__ (GOSYM_PREFIX "runtime.cpuprofAdd");
void runtime_usleep(uint32)
__asm__ (GOSYM_PREFIX "runtime.usleep");
int64 runtime_cputicks(void)