Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 66 for stealID (0.29 sec)

  1. src/runtime/tracemap.go

    	children [4]atomic.UnsafePointer // *traceMapNode (can't use generics because it's notinheap)
    	hash     uintptr
    	id       uint64
    	data     []byte
    }
    
    // stealID steals an ID from the table, ensuring that it will not
    // appear in the table anymore.
    func (tab *traceMap) stealID() uint64 {
    	return tab.seq.Add(1)
    }
    
    // put inserts the data into the table.
    //
    // It's always safe for callers to noescape data because put copies its bytes.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:03:35 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  2. src/runtime/tracestring.go

    // emit emits a string and creates an ID for it, but doesn't add it to the table. Returns the ID.
    func (t *traceStringTable) emit(gen uintptr, s string) uint64 {
    	// Grab an ID and write the string to the buffer.
    	id := t.tab.stealID()
    	systemstack(func() {
    		t.writeString(gen, id, s)
    	})
    	return id
    }
    
    // writeString writes the string to t.buf.
    //
    // Must run on the systemstack because it acquires t.lock.
    //
    //go:systemstack
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:03:35 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  3. src/internal/trace/testdata/generators/go122-syscall-steal-proc-self.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Tests syscall P stealing.
    //
    // Specifically, it tests a scenario where a thread 'steals'
    // a P from itself. It's just a ProcStop with extra steps when
    // it happens on the same P.
    
    package main
    
    import (
    	"internal/trace"
    	"internal/trace/event/go122"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:15:28 UTC 2024
    - 1K bytes
    - Viewed (0)
  4. src/internal/trace/testdata/generators/go122-syscall-steal-proc-simple.go

    	b0.Event("GoStatus", trace.GoID(1), trace.ThreadID(0), go122.GoRunning)
    	b0.Event("GoSyscallBegin", testgen.Seq(1), testgen.NoStack)
    	b0.Event("GoSyscallEndBlocked")
    
    	// A running goroutine steals proc 0.
    	b1 := g.Batch(trace.ThreadID(1), 0)
    	b1.Event("ProcStatus", trace.ProcID(2), go122.ProcRunning)
    	b1.Event("GoStatus", trace.GoID(2), trace.ThreadID(1), go122.GoRunning)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:15:28 UTC 2024
    - 988 bytes
    - Viewed (0)
  5. src/internal/trace/testdata/generators/go122-syscall-steal-proc-ambiguous.go

    	b0.Event("GoSyscallBegin", testgen.Seq(1), testgen.NoStack)
    	b0.Event("GoSyscallEnd")
    	b0.Event("GoSyscallBegin", testgen.Seq(2), testgen.NoStack)
    	b0.Event("GoSyscallEndBlocked")
    
    	// A running goroutine steals proc 0.
    	b1 := g.Batch(trace.ThreadID(1), 0)
    	b1.Event("ProcStatus", trace.ProcID(2), go122.ProcRunning)
    	b1.Event("GoStatus", trace.GoID(2), trace.ThreadID(1), go122.GoRunning)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:15:28 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  6. src/internal/trace/testdata/generators/go122-syscall-steal-proc-reacquire-new-proc.go

    	b0.Event("GoSyscallBegin", testgen.Seq(1), testgen.NoStack)
    	b0.Event("ProcStart", trace.ProcID(1), testgen.Seq(1))
    	b0.Event("GoSyscallEndBlocked")
    
    	// A running goroutine steals proc 0.
    	b1 := g.Batch(trace.ThreadID(1), 0)
    	b1.Event("ProcStatus", trace.ProcID(2), go122.ProcRunning)
    	b1.Event("GoStatus", trace.GoID(2), trace.ThreadID(1), go122.GoRunning)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:15:28 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  7. src/internal/trace/testdata/generators/go122-syscall-steal-proc-simple-bare-m.go

    	b0.Event("GoStatus", trace.GoID(1), trace.ThreadID(0), go122.GoRunning)
    	b0.Event("GoSyscallBegin", testgen.Seq(1), testgen.NoStack)
    	b0.Event("GoSyscallEndBlocked")
    
    	// A bare M steals the goroutine's P.
    	b1 := g.Batch(trace.ThreadID(1), 0)
    	b1.Event("ProcSteal", trace.ProcID(0), testgen.Seq(2), trace.ThreadID(0))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:15:28 UTC 2024
    - 855 bytes
    - Viewed (0)
  8. src/internal/trace/testdata/generators/go122-syscall-steal-proc-sitting-in-syscall.go

    import (
    	"internal/trace"
    	"internal/trace/event/go122"
    	testgen "internal/trace/internal/testgen/go122"
    )
    
    func main() {
    	testgen.Main(gen)
    }
    
    func gen(t *testgen.Trace) {
    	g := t.Generation(1)
    
    	// Steal proc from a goroutine that's been blocked
    	// in a syscall the entire generation.
    	b0 := g.Batch(trace.ThreadID(0), 0)
    	b0.Event("ProcStatus", trace.ProcID(0), go122.ProcSyscallAbandoned)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:15:28 UTC 2024
    - 946 bytes
    - Viewed (0)
  9. src/internal/trace/testdata/generators/go122-syscall-steal-proc-reacquire-new-proc-bare-m.go

    	b0.Event("GoSyscallBegin", testgen.Seq(1), testgen.NoStack)
    	b0.Event("ProcStart", trace.ProcID(1), testgen.Seq(1))
    	b0.Event("GoSyscallEndBlocked")
    
    	// A bare M steals the goroutine's P.
    	b1 := g.Batch(trace.ThreadID(1), 0)
    	b1.Event("ProcSteal", trace.ProcID(0), testgen.Seq(2), trace.ThreadID(0))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:15:28 UTC 2024
    - 999 bytes
    - Viewed (0)
  10. pilot/pkg/leaderelection/leaderelection.go

    	}
    	defaultRevision := l.defaultWatcher.GetDefault()
    	if l.revision != currentLeaderRevision && defaultRevision != "" && defaultRevision == l.revision {
    		// Always steal the lock if the new one is the default revision and the current one is not
    		return true
    	}
    	// Otherwise steal the lock if the new one and the current one are the same revision, but new one is local and current is remote
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 12 16:44:32 UTC 2024
    - 9.7K bytes
    - Viewed (0)
Back to top