mirror of
https://github.com/containers/podman.git
synced 2025-10-16 18:53:19 +08:00
fix(deps): update module github.com/shirou/gopsutil/v4 to v4.24.10
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
20
vendor/github.com/ebitengine/purego/struct_amd64.go
generated
vendored
20
vendor/github.com/ebitengine/purego/struct_amd64.go
generated
vendored
@ -111,7 +111,7 @@ func addStruct(v reflect.Value, numInts, numFloats, numStack *int, addInt, addFl
|
||||
return keepAlive
|
||||
}
|
||||
|
||||
func postMerger(t reflect.Type) bool {
|
||||
func postMerger(t reflect.Type) (passInMemory bool) {
|
||||
// (c) If the size of the aggregate exceeds two eightbytes and the first eight- byte isn’t SSE or any other
|
||||
// eightbyte isn’t SSEUP, the whole argument is passed in memory.
|
||||
if t.Kind() != reflect.Struct {
|
||||
@ -120,19 +120,7 @@ func postMerger(t reflect.Type) bool {
|
||||
if t.Size() <= 2*8 {
|
||||
return false
|
||||
}
|
||||
first := getFirst(t).Kind()
|
||||
if first != reflect.Float32 && first != reflect.Float64 {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func getFirst(t reflect.Type) reflect.Type {
|
||||
first := t.Field(0).Type
|
||||
if first.Kind() == reflect.Struct {
|
||||
return getFirst(first)
|
||||
}
|
||||
return first
|
||||
return true // Go does not have an SSE/SEEUP type so this is always true
|
||||
}
|
||||
|
||||
func tryPlaceRegister(v reflect.Value, addFloat func(uintptr), addInt func(uintptr)) (ok bool) {
|
||||
@ -196,7 +184,7 @@ func tryPlaceRegister(v reflect.Value, addFloat func(uintptr), addInt func(uintp
|
||||
val |= uint64(f.Int()&0xFFFF_FFFF) << shift
|
||||
shift += 32
|
||||
class |= _INTEGER
|
||||
case reflect.Int64:
|
||||
case reflect.Int64, reflect.Int:
|
||||
val = uint64(f.Int())
|
||||
shift = 64
|
||||
class = _INTEGER
|
||||
@ -212,7 +200,7 @@ func tryPlaceRegister(v reflect.Value, addFloat func(uintptr), addInt func(uintp
|
||||
val |= f.Uint() << shift
|
||||
shift += 32
|
||||
class |= _INTEGER
|
||||
case reflect.Uint64:
|
||||
case reflect.Uint64, reflect.Uint:
|
||||
val = f.Uint()
|
||||
shift = 64
|
||||
class = _INTEGER
|
||||
|
10
vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_arm.go
generated
vendored
Normal file
10
vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_arm.go
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
package cpu
|
||||
|
||||
type cpuTimes struct {
|
||||
User uint32
|
||||
Nice uint32
|
||||
Sys uint32
|
||||
Intr uint32
|
||||
Idle uint32
|
||||
}
|
12
vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go
generated
vendored
12
vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go
generated
vendored
@ -11,7 +11,10 @@ import (
|
||||
|
||||
// ExVirtualMemory represents Windows specific information
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/psapi/ns-psapi-performance_information
|
||||
type ExVirtualMemory struct {
|
||||
CommitLimit uint64 `json:"commitLimit"`
|
||||
CommitTotal uint64 `json:"commitTotal"`
|
||||
VirtualTotal uint64 `json:"virtualTotal"`
|
||||
VirtualAvail uint64 `json:"virtualAvail"`
|
||||
}
|
||||
@ -30,7 +33,16 @@ func (e *ExWindows) VirtualMemory() (*ExVirtualMemory, error) {
|
||||
return nil, windows.GetLastError()
|
||||
}
|
||||
|
||||
var perfInfo performanceInformation
|
||||
perfInfo.cb = uint32(unsafe.Sizeof(perfInfo))
|
||||
perf, _, _ := procGetPerformanceInfo.Call(uintptr(unsafe.Pointer(&perfInfo)), uintptr(perfInfo.cb))
|
||||
if perf == 0 {
|
||||
return nil, windows.GetLastError()
|
||||
}
|
||||
|
||||
ret := &ExVirtualMemory{
|
||||
CommitLimit: perfInfo.commitLimit * perfInfo.pageSize,
|
||||
CommitTotal: perfInfo.commitTotal * perfInfo.pageSize,
|
||||
VirtualTotal: memInfo.ullTotalVirtual,
|
||||
VirtualAvail: memInfo.ullAvailVirtual,
|
||||
}
|
||||
|
2
vendor/github.com/shirou/gopsutil/v4/mem/mem_windows.go
generated
vendored
2
vendor/github.com/shirou/gopsutil/v4/mem/mem_windows.go
generated
vendored
@ -82,6 +82,8 @@ func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer common.PdhCloseQuery.Call(uintptr(counter.Query))
|
||||
|
||||
usedPercent, err := counter.GetValue()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user