Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for trim_path (0.18 sec)

  1. src/cmd/vendor/github.com/google/pprof/internal/report/source.go

    			}
    		}
    	}
    	// Trim configured trim prefixes.
    	trimPaths := append(filepath.SplitList(filepath.ToSlash(trimPath)), "/proc/self/cwd/./", "/proc/self/cwd/")
    	for _, trimPath := range trimPaths {
    		if !strings.HasSuffix(trimPath, "/") {
    			trimPath += "/"
    		}
    		if strings.HasPrefix(sPath, trimPath) {
    			return path[len(trimPath):]
    		}
    	}
    	return path
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 31.3K bytes
    - Viewed (0)
  2. src/cmd/go/testdata/script/build_plugin_reproducible.txt

    [!buildmode:plugin] skip
    [short] skip
    [!cgo] skip '-buildmode=plugin requires external linking'
    
    go build -trimpath -buildvcs=false -buildmode=plugin -o a.so main.go
    go build -trimpath -buildvcs=false -buildmode=plugin -o b.so main.go
    cmp -q a.so b.so
    
    -- main.go --
    package main
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 19:07:03 UTC 2024
    - 296 bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/build_pgo.txt

    stderr 'compile.*-p runtime.*-pgoprofile=.*'
    
    # check that the build ID is different
    go list -export -json=BuildID -pgo=prof triv.go
    ! cmp stdout list.out
    
    # build with trimpath, buildinfo path should be trimmed
    go build -x -pgo=prof -trimpath -o triv.exe triv.go
    
    # check that path is trimmed
    go version -m triv.exe
    stdout 'build\s+-pgo=prof'
    
    -- prof --
    -- triv.go --
    package main
    func main() {}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 15:39:17 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing/testserver.go

    // test, we can just look at the runtime call stack. However, bazel compiles go
    // binaries with the -trimpath option so the simple approach fails however we
    // can consult environment variables to derive the path.
    //
    // The approach taken here works for both go test and bazel on the assumption
    // that if and only if trimpath is passed, we are running under bazel.
    func pkgPath(t Logger) (string, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 9K bytes
    - Viewed (1)
  5. src/cmd/go/internal/work/gc.go

    		return c
    	}
    	// Some process parallelism. Set c to min(4, maxprocs).
    	if c > 4 {
    		c = 4
    	}
    	return c
    }
    
    // trimpath returns the -trimpath argument to use
    // when compiling the action.
    func (a *Action) trimpath() string {
    	// Keep in sync with Builder.ccompile
    	// The trimmed paths are a little different, but we need to trim in the
    	// same situations.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 15:37:44 UTC 2024
    - 23K bytes
    - Viewed (0)
  6. cmd/kube-apiserver/app/testing/testserver.go

    // test, we can just look at the runtime call stack. However, bazel compiles go
    // binaries with the -trimpath option so the simple approach fails however we
    // can consult environment variables to derive the path.
    //
    // The approach taken here works for both go test and bazel on the assumption
    // that if and only if trimpath is passed, we are running under bazel.
    func pkgPath(t Logger) (string, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  7. src/cmd/vendor/github.com/google/pprof/internal/driver/driver.go

    		SampleValue:       value,
    		SampleMeanDivisor: meanDiv,
    		SampleType:        stype,
    		SampleUnit:        sample.Unit,
    
    		OutputUnit: cfg.Unit,
    
    		SourcePath: cfg.SourcePath,
    		TrimPath:   cfg.TrimPath,
    
    		IntelSyntax: cfg.IntelSyntax,
    	}
    
    	if len(p.Mapping) > 0 && p.Mapping[0].File != "" {
    		ropt.Title = filepath.Base(p.Mapping[0].File)
    	}
    
    	return ropt, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  8. Makefile

    build-debugging:
    	@(env bash $(PWD)/docs/debugging/build.sh)
    
    build: checks build-debugging ## builds minio to $(PWD)
    	@echo "Building minio binary to './minio'"
    	@CGO_ENABLED=0 go build -tags kqueue -trimpath --ldflags "$(LDFLAGS)" -o $(PWD)/minio 1>/dev/null
    
    hotfix-vars:
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 17:41:02 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  9. src/cmd/go/internal/work/exec.go

    	var trimpath []string
    	for i := range cgofiles {
    		path := mkAbs(p.Dir, cgofiles[i])
    		if opath, ok := fsys.OverlayPath(path); ok {
    			cgofiles[i] = opath
    			trimpath = append(trimpath, opath+"=>"+path)
    		}
    	}
    	if len(trimpath) > 0 {
    		cgoflags = append(cgoflags, "-trimpath", strings.Join(trimpath, ";"))
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 14:46:37 UTC 2024
    - 105.6K bytes
    - Viewed (0)
  10. src/runtime/debug/stack_test.go

    */
    func TestStack(t *testing.T) {
    	b := T(0).method()
    	lines := strings.Split(string(b), "\n")
    	if len(lines) < 6 {
    		t.Fatal("too few lines")
    	}
    
    	// If built with -trimpath, file locations should start with package paths.
    	// Otherwise, file locations should start with a GOROOT/src prefix
    	// (for whatever value of GOROOT is baked into the binary, not the one
    	// that may be set in the environment).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 15:19:04 UTC 2024
    - 5.5K bytes
    - Viewed (0)
Back to top