MCPcopy Index your code
hub / github.com/subtrace/subtrace / Add

Method Add

cmd/run/socket/inode.go:221–236  ·  view source on GitHub ↗
(ino *Inode)

Source from the content-addressed store, hash-verified

219}
220
221func (t *InodeTable) Add(ino *Inode) {
222 if _, ok := t.Get(ino.Number); ok { // fast path
223 return
224 }
225
226 t.mu.Lock()
227 defer t.mu.Unlock()
228
229 if old, ok := t.known[ino.Number]; ok {
230 if old != ino {
231 panic(fmt.Errorf("duplicate inode %d (old=%p, new=%p): old=%q, new=%q", ino.Number, old, ino, old.LogValue().String(), ino.LogValue().String()))
232 }
233 } else {
234 t.known[ino.Number] = ino
235 }
236}

Callers 15

SendEventMethod · 0.80
dispatchMethod · 0.80
HandleEventMethod · 0.80
queueWriteMethod · 0.80
UseRequestMethod · 0.80
UseResponseMethod · 0.80
FinishMethod · 0.80
insertMethod · 0.80
initFiltersMethod · 0.80
StartMethod · 0.80
installSocketMethod · 0.80
discardMultiMethod · 0.80

Calls 4

GetMethod · 0.95
LockMethod · 0.80
StringMethod · 0.45
LogValueMethod · 0.45

Tested by 1

TestBasicFunction · 0.64