Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for SETCGOTRACEBACK (0.17 sec)

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

    }
    
    void cpuHogThread2() {
    }
    
    struct cgoTracebackArg {
    	uintptr_t  context;
    	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);
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 17 22:59:31 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  2. src/runtime/pprof/testdata/mappingtest/main.go

    };
    */
    import "C"
    
    import (
    	"log"
    	"os"
    	"runtime"
    	"runtime/pprof"
    	"time"
    	"unsafe"
    )
    
    func init() {
    	if v := os.Getenv("SETCGOTRACEBACK"); v == "1" {
    		// Collect some PCs from C-side, but don't symbolize.
    		runtime.SetCgoTraceback(0, unsafe.Pointer(C.CollectCgoTraceback), nil, nil)
    	}
    }
    
    func main() {
    	go cpuHogGoFunction()
    	go cpuHogCFunction()
    	runtime.Gosched()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 08 02:40:04 UTC 2019
    - 2K bytes
    - Viewed (0)
  3. src/runtime/testdata/testprogcgo/pprof.go

    	salt2 = foo;
    }
    
    void cpuHog2() {
    }
    
    struct cgoTracebackArg {
    	uintptr_t  context;
    	uintptr_t  sigContext;
    	uintptr_t* buf;
    	uintptr_t  max;
    };
    
    // pprofCgoTraceback is passed to runtime.SetCgoTraceback.
    // For testing purposes it pretends that all CPU hits in C code are in cpuHog.
    // Issue #29034: At least 2 frames are required to verify all frames are captured
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 12 19:45:58 UTC 2021
    - 1.7K bytes
    - Viewed (0)
  4. src/runtime/cgo/libcgo.h

     */
    void darwin_arm_init_mach_exception_handler(void);
    
    /*
     * The cgo context function. See runtime.SetCgoTraceback.
     */
    struct context_arg {
    	uintptr_t Context;
    };
    extern void (*(_cgo_get_context_function(void)))(struct context_arg*);
    
    /*
     * The argument for the cgo traceback callback. See runtime.SetCgoTraceback.
     */
    struct cgoTracebackArg {
    	uintptr_t  Context;
    	uintptr_t  SigContext;
    	uintptr_t* Buf;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 13 20:50:04 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  5. src/runtime/testdata/testprogcgo/tracebackctxt.go

    // Copyright 2016 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    // Test the context argument to SetCgoTraceback.
    // Use fake context, traceback, and symbolizer functions.
    
    /*
    // Defined in tracebackctxt_c.c.
    extern void C1(void);
    extern void C2(void);
    extern void tcContext(void*);
    extern void tcContextSimple(void*);
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 29 15:30:38 UTC 2021
    - 2.8K bytes
    - Viewed (0)
  6. src/runtime/cgo/callbacks_traceback.go

    // license that can be found in the LICENSE file.
    
    //go:build darwin || linux
    
    package cgo
    
    import _ "unsafe" // for go:linkname
    
    // Calls the traceback function passed to SetCgoTraceback.
    
    //go:cgo_import_static x_cgo_callers
    //go:linkname x_cgo_callers x_cgo_callers
    //go:linkname _cgo_callers _cgo_callers
    var x_cgo_callers byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 475 bytes
    - Viewed (0)
  7. src/runtime/cgo/gcc_libinit.c

    		// initialization is complete but we do not know that all Go init
    		// functions have been run. We should not fetch cgo_context_function
    		// until they have been, because that is where a call to
    		// SetCgoTraceback is likely to occur. We are going to wait for Go
    		// initialization to be complete anyhow, later, by waiting for
    		// main_init_done to be closed in cgocallbackg1. We should wait here
    		// instead. See also issue #15943.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 01:07:18 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  8. src/runtime/testdata/testprogcgo/gprof.go

    import "C"
    
    import (
    	"fmt"
    	"io"
    	"runtime"
    	"runtime/pprof"
    	"time"
    	"unsafe"
    )
    
    func init() {
    	register("GoroutineProfile", GoroutineProfile)
    }
    
    func GoroutineProfile() {
    	runtime.SetCgoTraceback(0, unsafe.Pointer(C.gprofCgoTraceback), unsafe.Pointer(C.gprofCgoContext), nil)
    
    	go C.CallGoSleep()
    	go C.CallGoSleep()
    	go C.CallGoSleep()
    	time.Sleep(1 * time.Second)
    
    	prof := pprof.Lookup("goroutine")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 11 15:34:02 UTC 2021
    - 868 bytes
    - Viewed (0)
  9. src/runtime/testdata/testprogcgo/traceback.go

    import "C"
    
    import (
    	"runtime"
    	"unsafe"
    )
    
    func init() {
    	register("CrashTraceback", CrashTraceback)
    	register("CrashTracebackGo", CrashTracebackGo)
    }
    
    func CrashTraceback() {
    	runtime.SetCgoTraceback(0, unsafe.Pointer(C.cgoTraceback), nil, unsafe.Pointer(C.cgoSymbolizer))
    	C.tracebackF1()
    }
    
    func CrashTracebackGo() {
    	C.crashInGo = 1
    	CrashTraceback()
    }
    
    //export h1
    func h1() {
    	h2()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 24 21:47:44 UTC 2020
    - 949 bytes
    - Viewed (0)
  10. src/runtime/testdata/testprogcgo/raceprof.go

    }
    */
    import "C"
    
    import (
    	"bytes"
    	"fmt"
    	"runtime"
    	"runtime/pprof"
    	"unsafe"
    )
    
    func init() {
    	register("CgoRaceprof", CgoRaceprof)
    }
    
    func CgoRaceprof() {
    	runtime.SetCgoTraceback(0, unsafe.Pointer(C.raceprofTraceback), nil, nil)
    
    	var buf bytes.Buffer
    	pprof.StartCPUProfile(&buf)
    
    	C.runRaceprofThread()
    	fmt.Println("OK")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 24 18:13:14 UTC 2023
    - 1.7K bytes
    - Viewed (0)
Back to top