mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-01-22 18:02:51 +08:00
a2f289abf2
Automatic merge from submit-queue (batch tested with PRs 55798, 49579, 54862, 55188, 51990). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Add monitoring support for hardware accelerators Currently only NVIDIA GPU monitoring is implemented. Feature repo issue: https://github.com/kubernetes/features/issues/369 cAdvisor PR: https://github.com/google/cadvisor/pull/1762 /kind feature /sig node /sig instrumentation /area hw-accelerators **Release note**: ```release-note Kubelet now exposes metrics for NVIDIA GPUs attached to the containers. ``` Kubernetes-commit: 779105673ab2f00af9e02dc9ac3c6413588aeae4
51 lines
1.4 KiB
Go
51 lines
1.4 KiB
Go
// Code generated by linux/mkall.go generatePtracePair(mips, mips64). DO NOT EDIT.
|
|
|
|
// +build linux
|
|
// +build mips mips64
|
|
|
|
package unix
|
|
|
|
import "unsafe"
|
|
|
|
// PtraceRegsMips is the registers used by mips binaries.
|
|
type PtraceRegsMips struct {
|
|
Regs [32]uint64
|
|
Lo uint64
|
|
Hi uint64
|
|
Epc uint64
|
|
Badvaddr uint64
|
|
Status uint64
|
|
Cause uint64
|
|
}
|
|
|
|
// PtraceGetRegsMips fetches the registers used by mips binaries.
|
|
func PtraceGetRegsMips(pid int, regsout *PtraceRegsMips) error {
|
|
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
|
|
}
|
|
|
|
// PtraceSetRegsMips sets the registers used by mips binaries.
|
|
func PtraceSetRegsMips(pid int, regs *PtraceRegsMips) error {
|
|
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
|
|
}
|
|
|
|
// PtraceRegsMips64 is the registers used by mips64 binaries.
|
|
type PtraceRegsMips64 struct {
|
|
Regs [32]uint64
|
|
Lo uint64
|
|
Hi uint64
|
|
Epc uint64
|
|
Badvaddr uint64
|
|
Status uint64
|
|
Cause uint64
|
|
}
|
|
|
|
// PtraceGetRegsMips64 fetches the registers used by mips64 binaries.
|
|
func PtraceGetRegsMips64(pid int, regsout *PtraceRegsMips64) error {
|
|
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
|
|
}
|
|
|
|
// PtraceSetRegsMips64 sets the registers used by mips64 binaries.
|
|
func PtraceSetRegsMips64(pid int, regs *PtraceRegsMips64) error {
|
|
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
|
|
}
|