Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for AtExit (0.11 sec)

  1. src/cmd/covdata/covdata.go

    var memprofilerateflag = flag.Int("memprofilerate", 0, "Set memprofile sampling rate to value")
    
    var matchpkg func(name string) bool
    
    var atExitFuncs []func()
    
    func atExit(f func()) {
    	atExitFuncs = append(atExitFuncs, f)
    }
    
    func Exit(code int) {
    	for i := len(atExitFuncs) - 1; i >= 0; i-- {
    		f := atExitFuncs[i]
    		atExitFuncs = atExitFuncs[:i]
    		f()
    	}
    	os.Exit(code)
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/base/base.go

    	if logHeapTweaks {
    		sample := append([]metrics.Sample(nil), sample...) // avoid races with GC callback
    		AtExit(func() {
    			metrics.Read(sample)
    			goal := sample[GOAL].Value.Uint64()
    			count := sample[COUNT].Value.Uint64()
    			oldGogc := debug.SetGCPercent(100)
    			if oldGogc == 100 {
    				fmt.Fprintf(os.Stderr, "GCAdjust: AtExit goal %d gogc %d count %d maxprocs %d gcConcurrency %d\n",
    					goal, oldGogc, count, mp, gcConcurrency)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:18:34 UTC 2023
    - 8K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/xla_activity_listener.cc

    };
    
    void FlushAllListeners();
    
    XlaActivityListenerList* GetXlaActivityListenerList() {
      static XlaActivityListenerList* listener_list = new XlaActivityListenerList;
      static int unused = std::atexit(FlushAllListeners);
      (void)unused;
      return listener_list;
    }
    
    template <typename FnTy>
    Status ForEachListener(FnTy fn) {
      XlaActivityListenerList* listener_list = GetXlaActivityListenerList();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  4. src/cmd/link/internal/ld/main.go

    	if ctxt.Debugvlog > 0 {
    		// dump symbol info on crash
    		defer func() { ctxt.loader.Dump() }()
    	}
    	if ctxt.Debugvlog > 1 {
    		// dump symbol info on error
    		AtExit(func() {
    			if nerrors > 0 {
    				ctxt.loader.Dump()
    			}
    		})
    	}
    
    	switch *flagHeadType {
    	case "":
    	case "windowsgui":
    		ctxt.HeadType = objabi.Hwindows
    		windowsgui = true
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:59:50 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  5. src/cmd/go/internal/base/base.go

    // it is a documentation pseudo-command such as importpath.
    func (c *Command) Runnable() bool {
    	return c.Run != nil
    }
    
    var atExitFuncs []func()
    
    func AtExit(f func()) {
    	atExitFuncs = append(atExitFuncs, f)
    }
    
    func Exit() {
    	for _, f := range atExitFuncs {
    		f()
    	}
    	os.Exit(exitStatus)
    }
    
    func Fatalf(format string, args ...any) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  6. src/cmd/go/main.go

    	if cfg.DebugTrace == "" {
    		return pctx
    	}
    
    	ctx, close, err := trace.Start(pctx, cfg.DebugTrace)
    	if err != nil {
    		base.Fatalf("failed to start trace: %v", err)
    	}
    	base.AtExit(func() {
    		if err := close(); err != nil {
    			base.Fatalf("failed to stop trace: %v", err)
    		}
    	})
    
    	return ctx
    }
    
    // handleChdirFlag handles the -C flag before doing anything else.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:09:11 UTC 2024
    - 10K bytes
    - Viewed (0)
  7. src/cmd/go/internal/work/init.go

    	"strconv"
    	"sync"
    )
    
    var buildInitStarted = false
    
    func BuildInit() {
    	if buildInitStarted {
    		base.Fatalf("go: internal error: work.BuildInit called more than once")
    	}
    	buildInitStarted = true
    	base.AtExit(closeBuilders)
    
    	modload.Init()
    	instrumentInit()
    	buildModeInit()
    	if err := fsys.Init(base.Cwd()); err != nil {
    		base.Fatal(err)
    	}
    
    	// Make sure -pkgdir is absolute, because we run commands
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 19:13:34 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  8. src/runtime/race.go

    	// already held it's assumed that the first caller exits the program
    	// so other calls can hang forever without an issue.
    	lock(&raceFiniLock)
    
    	// __tsan_fini will run C atexit functions and C++ destructors,
    	// which can theoretically call back into Go.
    	// Tell the scheduler we entering external code.
    	entersyscall()
    
    	// We're entering external code that may call ExitProcess on
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:37:29 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  9. test/prove.go

    	i := 0
    	if len(b) > i {
    	top:
    		println(b[i]) // ERROR "Induction variable: limits \[0,\?\), increment 1$" "Proved IsInBounds$"
    		i++
    		if i < len(b) {
    			goto top
    		}
    	}
    }
    
    func atexit(foobar []func()) {
    	for i := len(foobar) - 1; i >= 0; i-- { // ERROR "Induction variable: limits \[0,\?\], increment 1"
    		f := foobar[i]
    		foobar = foobar[:i] // ERROR "IsSliceInBounds"
    		f()
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 23 00:02:36 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  10. src/cmd/link/internal/ld/lib.go

    // passes over the host archives below.
    func loadWindowsHostArchives(ctxt *Link) {
    	any := true
    	for i := 0; any && i < 2; i++ {
    		// Link crt2.o (if present) to resolve "atexit" when
    		// using LLVM-based compilers.
    		isunresolved := symbolsAreUnresolved(ctxt, []string{"atexit"})
    		if isunresolved[0] {
    			if p := ctxt.findLibPath("crt2.o"); p != "none" {
    				hostObject(ctxt, "crt2", p)
    			}
    		}
    		if *flagRace {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 18:45:27 UTC 2024
    - 88.6K bytes
    - Viewed (0)
Back to top