Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for FuncForPC (0.19 sec)

  1. src/cmd/cgo/internal/test/callback_windows.go

    	}
    	pc := make([]uintptr, 100)
    	n := 0
    	nestedCall(func() {
    		n = int(C.backtrace(C.DWORD(len(pc)), (*C.PVOID)(unsafe.Pointer(&pc[0]))))
    	})
    	got := make([]string, 0, n)
    	for i := 0; i < n; i++ {
    		f := runtime.FuncForPC(pc[i] - 1)
    		if f == nil {
    			continue
    		}
    		fname := f.Name()
    		switch fname {
    		case "goCallback":
    			// TODO(qmuntal): investigate why this function doesn't appear
    			// when using the external linker.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Nov 29 16:01:37 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  2. cmd/api-utils.go

    // name as a string to clean up the name retrieved via reflection. This function
    // only works correctly when the type is present in the cmd package.
    func getHandlerName(f http.HandlerFunc, cmdType string) string {
    	name := runtime.FuncForPC(reflect.ValueOf(f).Pointer()).Name()
    
    	packageName := fmt.Sprintf("github.com/minio/minio/cmd.%s.", cmdType)
    	name = strings.TrimPrefix(name, packageName)
    	name = strings.TrimSuffix(name, "Handler-fm")
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Mar 04 18:05:56 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  3. internal/logger/logger.go

    }
    
    func getSource(level int) string {
    	pc, file, lineNumber, ok := runtime.Caller(level)
    	if ok {
    		// Clean up the common prefixes
    		file = trimTrace(file)
    		_, funcName := filepath.Split(runtime.FuncForPC(pc).Name())
    		return fmt.Sprintf("%v:%v:%v()", file, lineNumber, funcName)
    	}
    	return ""
    }
    
    // getTrace method - creates and returns stack trace
    func getTrace(traceLevel int) []string {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.2K bytes
    - Viewed (0)
  4. cmd/http-tracer.go

    		tc, ok := r.Context().Value(mcontext.ContextTraceKey).(*mcontext.TraceCtxt)
    		if !ok {
    			// Tracing is not enabled for this request
    			f.ServeHTTP(w, r)
    			return
    		}
    
    		tc.FuncName = getOpName(runtime.FuncForPC(reflect.ValueOf(f).Pointer()).Name())
    		tc.RequestRecorder.LogBody = logBody
    		tc.ResponseRecorder.LogAllBody = logBody
    		tc.ResponseRecorder.LogErrBody = true
    
    		f.ServeHTTP(w, r)
    	}
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  5. tests/callbacks_test.go

    }
    
    func getFuncName(fc interface{}) string {
    	reflectValue, ok := fc.(reflect.Value)
    	if !ok {
    		reflectValue = reflect.ValueOf(fc)
    	}
    
    	fnames := strings.Split(runtime.FuncForPC(reflectValue.Pointer()).Name(), ".")
    	return fnames[len(fnames)-1]
    }
    
    func c1(*gorm.DB) {}
    func c2(*gorm.DB) {}
    func c3(*gorm.DB) {}
    func c4(*gorm.DB) {}
    func c5(*gorm.DB) {}
    func c6(*gorm.DB) {}
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  6. cmd/namespace-lock.go

    	}
    }
    
    func getSource(n int) string {
    	var funcName string
    	pc, filename, lineNum, ok := runtime.Caller(n)
    	if ok {
    		filename = pathutil.Base(filename)
    		funcName = strings.TrimPrefix(runtime.FuncForPC(pc).Name(),
    			"github.com/minio/minio/cmd.")
    	} else {
    		filename = "<unknown>"
    		lineNum = 0
    	}
    
    	return fmt.Sprintf("[%s:%d:%s()]", filename, lineNum, funcName)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/test/callback.go

    		"runtime.goexit",
    	}
    	nestedCall(func() {
    		n = runtime.Callers(4, pc)
    	})
    	if n != len(name) {
    		t.Errorf("expected %d frames, got %d", len(name), n)
    	}
    	for i := 0; i < n; i++ {
    		f := runtime.FuncForPC(pc[i] - 1) // TODO: use runtime.CallersFrames
    		if f == nil {
    			t.Fatalf("expected non-nil Func for pc %d", pc[i])
    		}
    		fname := f.Name()
    		// Remove the prepended pathname from automatically
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 111.5K bytes
    - Viewed (0)
  8. api/go1.txt

    pkg runtime, func Breakpoint()
    pkg runtime, func CPUProfile() []uint8
    pkg runtime, func Caller(int) (uintptr, string, int, bool)
    pkg runtime, func Callers(int, []uintptr) int
    pkg runtime, func FuncForPC(uintptr) *Func
    pkg runtime, func GC()
    pkg runtime, func GOMAXPROCS(int) int
    pkg runtime, func GOROOT() string
    pkg runtime, func Goexit()
    pkg runtime, func GoroutineProfile([]StackRecord) (int, bool)
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Aug 14 18:58:28 GMT 2013
    - 1.7M bytes
    - Viewed (1)
Back to top