diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-26 01:57:04 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-26 01:57:04 +0000 |
commit | b9976017d25543a587f155ae05044ca7acec2bc5 (patch) | |
tree | 327ba5fd7f5170e2e9e56e5a3503f6a733ffaed4 /libgo | |
parent | eb9f349aaf87e84d270b24e9f39b8d2230c965a1 (diff) | |
download | gcc-b9976017d25543a587f155ae05044ca7acec2bc5.tar.gz |
runtime, runtime/pprof: Fix runtime/pprof test to pass, enable it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189878 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/Makefile.am | 6 | ||||
-rw-r--r-- | libgo/Makefile.in | 6 | ||||
-rw-r--r-- | libgo/go/runtime/pprof/pprof_test.go | 3 | ||||
-rw-r--r-- | libgo/runtime/go-signal.c | 3 | ||||
-rw-r--r-- | libgo/runtime/proc.c | 5 | ||||
-rw-r--r-- | libgo/runtime/runtime.h | 2 |
6 files changed, 15 insertions, 10 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am index 7923567e978..f59b0048495 100644 --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -1794,7 +1794,7 @@ GOTESTFLAGS = # Check a package. CHECK = \ - GC="$(GOC) $(GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \ + GC="$(GOC) $(GOCFLAGS) $($(subst /,_,$@)_GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \ export GC; \ GOLIBS="$(MATH_LIBS) $(NET_LIBS)"; \ export GOLIBS; \ @@ -3012,6 +3012,9 @@ runtime/pprof.lo: $(go_runtime_pprof_files) runtime/pprof/check: $(CHECK_DEPS) @$(CHECK) .PHONY: runtime/pprof/check +# At least for now, we need -static-libgo for this test, because +# otherwise we can't get the line numbers. +runtime_pprof_check_GOCFLAGS = -static-libgo @go_include@ sync/atomic.lo.dep sync/atomic.lo.dep: $(go_sync_atomic_files) @@ -3548,6 +3551,7 @@ TEST_PACKAGES = \ os/user/check \ path/filepath/check \ regexp/syntax/check \ + runtime/pprof/check \ sync/atomic/check \ text/scanner/check \ text/tabwriter/check \ diff --git a/libgo/Makefile.in b/libgo/Makefile.in index 90d38206cdc..18f14141b47 100644 --- a/libgo/Makefile.in +++ b/libgo/Makefile.in @@ -2029,7 +2029,7 @@ GOTESTFLAGS = # Check a package. CHECK = \ - GC="$(GOC) $(GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \ + GC="$(GOC) $(GOCFLAGS) $($(subst /,_,$@)_GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \ export GC; \ GOLIBS="$(MATH_LIBS) $(NET_LIBS)"; \ export GOLIBS; \ @@ -2089,6 +2089,9 @@ CHECK_DEPS = libgo.la libgobegin.a \ $(toolexeclibgotexttemplate_DATA) \ $(toolexeclibgounicode_DATA) +# At least for now, we need -static-libgo for this test, because +# otherwise we can't get the line numbers. +runtime_pprof_check_GOCFLAGS = -static-libgo # How to build a .gox file from a .lo file. BUILDGOX = \ @@ -2218,6 +2221,7 @@ TEST_PACKAGES = \ os/user/check \ path/filepath/check \ regexp/syntax/check \ + runtime/pprof/check \ sync/atomic/check \ text/scanner/check \ text/tabwriter/check \ diff --git a/libgo/go/runtime/pprof/pprof_test.go b/libgo/go/runtime/pprof/pprof_test.go index 82bb2a2926b..e933058e558 100644 --- a/libgo/go/runtime/pprof/pprof_test.go +++ b/libgo/go/runtime/pprof/pprof_test.go @@ -71,7 +71,8 @@ func TestCPUProfile(t *testing.T) { if f == nil { continue } - if strings.Contains(f.Name(), "ChecksumIEEE") { + if strings.Contains(f.Name(), "ChecksumIEEE") || + (strings.Contains(f.Name(), "update") && strings.Contains(f.Name(), "crc32")) { found = true } } diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c index 5d398b04a02..9fbe86e0c51 100644 --- a/libgo/runtime/go-signal.c +++ b/libgo/runtime/go-signal.c @@ -149,8 +149,7 @@ sig_handler (int sig) #ifdef SIGPROF if (sig == SIGPROF) { - /* FIXME. */ - runtime_sigprof (0, 0, nil, nil); + runtime_sigprof (); return; } #endif diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index e3befbec996..224dce95ba0 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -1681,10 +1681,7 @@ static struct { // Called if we receive a SIGPROF signal. void -runtime_sigprof(uint8 *pc __attribute__ ((unused)), - uint8 *sp __attribute__ ((unused)), - uint8 *lr __attribute__ ((unused)), - G *gp __attribute__ ((unused))) +runtime_sigprof() { int32 n; diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h index 76a9eef4fd6..dc4fc0817f5 100644 --- a/libgo/runtime/runtime.h +++ b/libgo/runtime/runtime.h @@ -451,7 +451,7 @@ const byte* runtime_getenv(const char*); int32 runtime_atoi(const byte*); uint32 runtime_fastrand1(void); -void runtime_sigprof(uint8 *pc, uint8 *sp, uint8 *lr, G *gp); +void runtime_sigprof(); void runtime_resetcpuprofiler(int32); void runtime_setcpuprofilerate(void(*)(uintptr*, int32), int32); void runtime_usleep(uint32); |