Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for cpuHog (0.1 sec)

  1. src/runtime/testdata/testprogcgo/pprof.go

    // Issue #29034: At least 2 frames are required to verify all frames are captured
    // since runtime/pprof ignores the runtime.goexit base frame if it exists.
    void pprofCgoTraceback(void* parg) {
    	struct cgoTracebackArg* arg = (struct cgoTracebackArg*)(parg);
    	arg->buf[0] = (uintptr_t)(cpuHog) + 0x10;
    	arg->buf[1] = (uintptr_t)(cpuHog2) + 0x4;
    	arg->buf[2] = 0;
    }
    */
    import "C"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 12 19:45:58 UTC 2021
    - 1.7K bytes
    - Viewed (0)
  2. src/cmd/trace/testdata/testprog/main.go

    	}
    	done <- err
    }
    
    func cpu10(wg *sync.WaitGroup) {
    	defer wg.Done()
    	cpuHog(10 * time.Millisecond)
    }
    
    func cpu20(wg *sync.WaitGroup) {
    	defer wg.Done()
    	cpuHog(20 * time.Millisecond)
    }
    
    func cpuHog(dt time.Duration) {
    	start := time.Now()
    	for i := 0; ; i++ {
    		if i%1000 == 0 && time.Since(start) > dt {
    			return
    		}
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 17:15:58 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  3. src/runtime/testdata/testprogcgo/threadpprof.go

    	uintptr_t  sigContext;
    	uintptr_t* buf;
    	uintptr_t  max;
    };
    
    // pprofCgoThreadTraceback is passed to runtime.SetCgoTraceback.
    // For testing purposes it pretends that all CPU hits on the cpuHog
    // C thread are in cpuHog.
    void pprofCgoThreadTraceback(void* parg) {
    	struct cgoTracebackArg* arg = (struct cgoTracebackArg*)(parg);
    	if (pthread_self() == tid) {
    		arg->buf[0] = (uintptr_t)(cpuHogThread) + 0x10;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 17 22:59:31 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  4. src/runtime/crash_cgo_test.go

    		}
    	}
    }
    
    func TestCgoPprof(t *testing.T) {
    	testCgoPprof(t, "", "CgoPprof", "cpuHog", "runtime.main")
    }
    
    func TestCgoPprofPIE(t *testing.T) {
    	testCgoPprof(t, "-buildmode=pie", "CgoPprof", "cpuHog", "runtime.main")
    }
    
    func TestCgoPprofThread(t *testing.T) {
    	testCgoPprof(t, "", "CgoPprofThread", "cpuHogThread", "cpuHogThread2")
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 16:44:47 UTC 2024
    - 22.2K bytes
    - Viewed (0)
  5. src/internal/trace/testdata/testprog/cpu-profile.go

    // The actual CPU hogging function.
    // Must not call other functions nor access heap/globals in the loop,
    // otherwise under race detector the samples will be in the race runtime.
    func cpuHog1(x int) int {
    	return cpuHog0(x, 1e5)
    }
    
    func cpuHog0(x, n int) int {
    	foo := x
    	for i := 0; i < n; i++ {
    		if i%1000 == 0 {
    			// Spend time in mcall, stored as gp.m.curg, with g0 running
    			runtime.Gosched()
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  6. src/runtime/pprof/pprof_test.go

    // otherwise under race detector the samples will be in the race runtime.
    func cpuHog1(x int) int {
    	return cpuHog0(x, 1e5)
    }
    
    func cpuHog0(x, n int) int {
    	foo := x
    	for i := 0; i < n; i++ {
    		if foo > 0 {
    			foo *= foo
    		} else {
    			foo *= foo + 1
    		}
    	}
    	return foo
    }
    
    func cpuHog2(x int) int {
    	foo := x
    	for i := 0; i < 1e5; i++ {
    		if foo > 0 {
    			foo *= foo
    		} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 68.8K bytes
    - Viewed (0)
  7. src/cmd/trace/testdata/go122.test

    String id=68
    	data="runtime.asyncPreempt"
    String id=69
    	data="/usr/local/google/home/mknyszek/work/go-1/src/runtime/preempt_amd64.s"
    String id=70
    	data="main.cpuHog"
    String id=71
    	data="main.main.func1"
    String id=72
    	data="runtime.gcMarkDone"
    String id=73
    	data="/usr/local/google/home/mknyszek/work/go-1/src/runtime/mgc.go"
    String id=74
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 17:15:58 UTC 2024
    - 166K bytes
    - Viewed (0)
  8. cmd/utils.go

    			return nil, fmt.Errorf("unable to perform CPU IO profile with %d goroutines", n)
    		}
    		dirPath, err := os.MkdirTemp("", "profile")
    		if err != nil {
    			return nil, err
    		}
    		fn := filepath.Join(dirPath, "cpuio.out")
    		f, err := Create(fn)
    		if err != nil {
    			return nil, err
    		}
    		stop := fgprof.Start(f, fgprof.FormatPprof)
    		prof.stopFn = func() ([]byte, error) {
    			err := stop()
    			if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 05 22:00:34 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  9. tensorflow/c/eager/c_api_test.cc

    void TensorHandleSilentCopy(bool async,
                                TFE_ContextDevicePlacementPolicy global_policy,
                                TFE_ContextDevicePlacementPolicy thread_policy,
                                bool cpu_op) {
      std::unique_ptr<TF_Status, decltype(&TF_DeleteStatus)> status(
          TF_NewStatus(), TF_DeleteStatus);
      TFE_ContextOptions* opts = TFE_NewContextOptions();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Aug 03 20:50:20 UTC 2023
    - 94.6K bytes
    - Viewed (0)
Back to top