]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
runtime, runtime/pprof: Fix runtime/pprof test to pass, enable it.
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 26 Jul 2012 01:57:04 +0000 (01:57 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 26 Jul 2012 01:57:04 +0000 (01:57 +0000)
From-SVN: r189878

libgo/Makefile.am
libgo/Makefile.in
libgo/go/runtime/pprof/pprof_test.go
libgo/runtime/go-signal.c
libgo/runtime/proc.c
libgo/runtime/runtime.h

index 7923567e978d7c7bbc18e926eb942e6c1921e201..f59b0048495034c55c437f345bd4b52192116548 100644 (file)
@@ -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 \
index 90d38206cdc772d2f117e49cf48ac2c7a1a1b74c..18f14141b47c8494ca10a234628e151cf6bf0ca9 100644 (file)
@@ -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 \
index 82bb2a2926b20358e30f632a68f69cdbf89a630a..e933058e5580022224f9370126fcc4154c60a690 100644 (file)
@@ -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
                        }
                }
index 5d398b04a02251d9184d9f5a3c63018616cef759..9fbe86e0c51b2d01561926f818f5c5b52567dbd3 100644 (file)
@@ -149,8 +149,7 @@ sig_handler (int sig)
 #ifdef SIGPROF
   if (sig == SIGPROF)
     {
-      /* FIXME.  */
-      runtime_sigprof (0, 0, nil, nil);
+      runtime_sigprof ();
       return;
     }
 #endif
index e3befbec996dd3fac404ac1813c4ce8df759db10..224dce95ba021b092d326680253067b737d149f6 100644 (file)
@@ -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;
 
index 76a9eef4fd658e4b679e4d55baf40771beaf17bd..dc4fc0817f5254a3b6492d0c410a9ed1bd9b2e4d 100644 (file)
@@ -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);