$22 GRAYBYTE WORDPRESS FILE MANAGER $87

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/lib/golang/src/cmd/trace/

HOME
Current File : /lib/golang/src/cmd/trace//viewer.go
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package main

import (
	"fmt"
	"internal/trace"
	"internal/trace/traceviewer"
	"slices"
	"time"
)

// viewerFrames returns the frames of the stack of ev. The given frame slice is
// used to store the frames to reduce allocations.
func viewerFrames(stk trace.Stack) []trace.StackFrame {
	return slices.Collect(stk.Frames())
}

func viewerGState(state trace.GoState, inMarkAssist bool) traceviewer.GState {
	switch state {
	case trace.GoUndetermined:
		return traceviewer.GDead
	case trace.GoNotExist:
		return traceviewer.GDead
	case trace.GoRunnable:
		return traceviewer.GRunnable
	case trace.GoRunning:
		return traceviewer.GRunning
	case trace.GoWaiting:
		if inMarkAssist {
			return traceviewer.GWaitingGC
		}
		return traceviewer.GWaiting
	case trace.GoSyscall:
		// N.B. A goroutine in a syscall is considered "executing" (state.Executing() == true).
		return traceviewer.GRunning
	default:
		panic(fmt.Sprintf("unknown GoState: %s", state.String()))
	}
}

func viewerTime(t time.Duration) float64 {
	return float64(t) / float64(time.Microsecond)
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
16 Dec 2025 9.30 PM
root / root
0755
doc.go
1.045 KB
4 Dec 2025 6.06 PM
root / root
0644
gen.go
11.664 KB
4 Dec 2025 6.06 PM
root / root
0644
goroutinegen.go
4.632 KB
4 Dec 2025 6.06 PM
root / root
0644
goroutines.go
10.924 KB
4 Dec 2025 6.06 PM
root / root
0644
gstate.go
11.987 KB
4 Dec 2025 6.06 PM
root / root
0644
jsontrace.go
6.522 KB
4 Dec 2025 6.06 PM
root / root
0644
main.go
11.871 KB
4 Dec 2025 6.06 PM
root / root
0644
pprof.go
10.013 KB
4 Dec 2025 6.06 PM
root / root
0644
procgen.go
6.149 KB
4 Dec 2025 6.06 PM
root / root
0644
regions.go
14.23 KB
4 Dec 2025 6.06 PM
root / root
0644
tasks.go
11.785 KB
4 Dec 2025 6.06 PM
root / root
0644
threadgen.go
5.665 KB
4 Dec 2025 6.06 PM
root / root
0644
viewer.go
1.188 KB
4 Dec 2025 6.06 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF