# Functions
GetStats returns the singleton instance of Stats.
HeatForecasterList returns a sorted list of registered heat forecaster names.
HeatForecasterRegister registers a new heat forecaster with its creator function.
Log returns current logger.
MustParseBytes is a helper function that wraps ParseBytes and panics if an error occurs.
NewAddrData returns new AddrData instance that associates data to an address range.
NewAddrDatas returns a data structure that contains many address ranges with different data.
NewAddrRange creates a new AddrRange with given startAddr and stopAddr.
NewAddrRangeFromString converts a string representation to an AddrRange.
NewAddrRanges creates an AddrRanges instance with a given process ID and address ranges.
NewCounterHeatmap creates a new Heatmap instance.
NewHeatForecaster creates a new instance of HeatForecaster based on the provided name.
NewHeatForecasterChain creates a new instance of HeatForecasterChain.
NewHeatForecasterStdio creates a new instance of HeatForecasterStdio.
NewHeatForecasterStub creates a new instance of HeatForecasterStub with default configuration.
NewHeatForecasterTrace creates a new instance of HeatForecasterTrace.
NewLoggerWrapper creates a new Logger instance that wraps the provided standard logger.
NewMover creates a new instance of the Mover.
NewMoverTask creates a new memory movement task.
NewPidWatcher creates a new PID watcher instance based on the provided name.
NewPidWatcherCgroups creates a new instance of the Cgroups-based PID watcher.
NewPidWatcherFilter creates a new instance of PidWatcherFilter.
NewPidWatcherPidlist creates a new instance of PidWatcherPidlist.
NewPidWatcherProc creates a new instance of PidWatcherProc with default configuration.
NewPidWatcherStub creates a new instance of PidWatcherStub with default configuration.
NewPolicy creates a new instance of a policy based on its name.
NewPolicyAge creates a new instance of the age policy.
NewPolicyHeat creates a new instance of PolicyHeat.
NewPolicyRatio creates a new instance of PolicyRatio.
NewPolicyStub creates a new instance of PolicyStub with default configuration.
NewProcess creates a new Process instance with the specified process ID (pid).
NewPrompt creates a new interactive prompt with the given prompt string and I/O readers/writers.
NewRoutine creates a new instance of a routine based on its name.
NewRoutineStatActions creates a new instance of RoutineStatActions.
NewRoutineStub creates a new instance of RoutineStub with default configuration.
NewTracker creates a new Tracker instance based on the provided name.
NewTrackerDamon creates a new TrackerDamon instance.
NewTrackerFinder creates a new instance of TrackerFinder.
NewTrackerIdlePage creates a new instance of TrackerIdlePage.
NewTrackerMulti creates a new instance of TrackerMulti.
NewTrackerSoftDirty creates a new instance of TrackerSoftDirty.
NewTrackerStub creates a new instance of TrackerStub with default configuration.
ParseBytes parses a string representation of bytes and returns the equivalent number of bytes.
PidWatcherList returns a sorted list of available PID watcher names.
PidWatcherRegister registers a new PID watcher with a given name and creator function.
PolicyList returns a sorted list of available policy names.
PolicyRegister registers a new policy with its creator function.
No description provided by the author
No description provided by the author
ProcPageIdleBitmapOpen returns opened page_idle/bitmap file.
ProcPagemapOpen returns opened pagemap file for a process.
RoutineList returns a sorted list of registered routine names.
RoutineRegister registers a routine with its name and creator function.
SetLogDebug controls whether debug messages are logged.
SetLogger sets a custom logger for the package.
SetLogPrefix sets prefix on log messages.
TrackerList returns a list of registered tracker names.
TrackerRegister registers a new Tracker with a given name and creator function.
# Constants
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
/proc/kpageflags bits from include/uapi/linux/kernel-page-flags.h.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
move_pages syscall flags MPOL_MF_MOVE - only move pages exclusive to this process.
NodeSwap is used when swapping in and out.
NodeUndefined is used when moving memory among numa nodes.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
corresponding bitmasks.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
/proc/pid/pagemap bits from fs/proc/task_mmu.c.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
Requirements for pagemap bits.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
addressRangeAttributes.
nolint:golint //ignore the variables' naming as they are from Linux kernel code.
# Variables
HeatmapConfigDefaults defines default configuration settings as JSON.
# Structs
AddrData is a data structure for storing arbitrary data on memory addresses.
AddrDatas slice is sorted by non-overlapping address ranges.
AddrRange represents a memory address range with a start address and length.
AddrRanges is a struct that holds a process ID and a collection of memory address ranges.
Cmd represents a command with a description and a function to execute.
FilteringPidListener is a listener for PidWatcherFilter that filters and forwards PID changes.
HeatForecasterChain represents a chain of heat forecasters.
HeatForecasterChainConfig represents the configuration for the HeatForecasterChain.
HeatForecasterConfig represents the configuration for a heat forecaster.
HeatForecasterStdio is a heat forecaster that communicates with an external process through standard I/O.
HeatForecasterStdioConfig represents the configuration for HeatForecasterStdio, containing the command to execute, stderr configuration, and retry count.
HeatForecasterStub defines empty struct for the scenarios that there is no heat forecaster.
HeatForecasterTrace is a heat forecaster that writes heat data to a trace file.
HeatForecasterTraceConfig represents the configuration for the HeatForecasterTrace.
Heatmap stores heatmap configuration and heat information for the pid.
HeatmapConfig represents the configuration for a heatmap.
HeatRange stores memory addresses, length, heat information and timestamps.
Mover represents the memory mover, which manages and executes memory movement tasks.
MoverConfig represents the configuration for memory movement tasks.
MoverTask represents a single memory movement task.
Page represents an individual memory page with an address.
Pages represents a collection of memory pages associated with a process.
PidFilterConfig holds the configuration for a PidWatcherFilter filter.
PidWatcherCgroups is a type implementing the PidWatcher interface for Cgroups-based PID watching.
PidWatcherCgroupsConfig holds the configuration for the Cgroups-based PID watcher.
PidWatcherConfig represents the configuration for a PID watcher.
PidWatcherFilter is an implementation of PidWatcher that filters PIDs based on configured rules.
PidWatcherFilterConfig holds the configuration for PidWatcherFilter.
PidWatcherPidlist is an implementation of PidWatcher that watches a predefined list of PIDs.
PidWatcherPidlistConfig holds the configuration for PidWatcherPidlist.
PidWatcherProc is an implementation of PidWatcher that watches for new processes under /proc.
PidWatcherProcConfig holds the configuration for PidWatcherProc.
PidWatcherStub defines empty struct for the scenarios without PidWatcher configured.
PolicyAge is a type implementing the Policy interface for the age policy.
PolicyAgeConfig holds the configuration for the age policy.
PolicyConfig represents the configuration for a policy.
PolicyHeat represents all the elements involved in the heat policy, including the configuration, pid watchers, heat map information, pid and the address ranges, mover, heat forecaster information and so on.
PolicyHeatConfig represents the configuration for the heat policy.
PolicyRatio is the main struct for the ratio policy, implementing the policy interface.
PolicyRatioConfig represents the configuration for ratio policy, among which Ratio means the the portion of the least recently used memory, which should be swapped out when RatioTargets is missing or [-1], or moved to the target nodes according to RatioTargets.
PolicyStub defines empty struct for the scenarios without policy configured.
Process represents a process with a unique process ID (pid).
ProcKpageflagsFile represents a structure for managing a file associated with kpage flags.
ProcMemFile represents a structure for managing a file associated with process memory.
ProcPageIdleBitmapFile represents a structure for managing a file associated with proc page idle bitmaps.
ProcPagemapFile represents a structure for managing a file associated with proc pagemap.
Prompt represents an interactive prompt with associated functionality.
RangeHeat represents the heat (accesses + reads + writes) for a memory range.
RoutineConfig holds the configuration for a routine.
RoutineStatActions represents the StatActions routine.
RoutineStatActionsConfig holds the configuration for the StatActions routine.
RoutineStub defines empty struct for the scenarios without routines configured.
Stats represents various statistics related to memory moving.
StatsHeartbeat represents a heartbeat for a specific name.
StatsMadvised represents statistics related to process_madvise system calls for a specific process.
StatsMoved represents statistics related to move_pages system calls for a specific process.
StatsPageScan represents statistics related to memory scans for a specific process.
StatsPidMadvised contains the summarized statistics related to process_madvise system calls for a specific process.
StatsPidMoved contains the summarized statistics related to move_pages system calls for a specific process.
StatsPidScanned contains the summarized statistics related to memory scans for a specific process.
StatsPulse represents heartbeat statistics for a specific name.
TrackerConfig holds the configuration for the memory tracker.
TrackerCounter holds counters for memory tracking.
TrackerDamon represents the main DAMON tracker structure.
TrackerDamonConfig holds configuration parameters for connecting to DAMON.
TrackerFinder is a memory tracker that reports address ranges without any accesses on them.
TrackerFinderConfig represents the configuration for TrackerFinder.
TrackerIdlePage is a tracker implementation for monitoring idle pages.
TrackerIdlePageConfig represents the configuration for the TrackerIdlePage.
TrackerMulti is a tracker that aggregates multiple trackers, each configured independently.
TrackerMultiConfig represents the configuration for multiple trackers, it containing a list of TrackerConfig.
TrackerSoftDirty is a memory tracker that detects memory writes.
TrackerSoftDirtyConfig represents the configuration for TrackerSoftDirty.
TrackerStub defines empty struct for the scenarios without tracker configured.
# Interfaces
DamonUserspaceInterface represents the interface for DAMON interactions.
HeatForecaster is an interface that defines the methods for a heat forecaster.
Logger interface defines methods for logging at different severity levels.
PidListener is an interface for handling PID events.
PidWatcher is an interface for managing PID watchers.
Policy interface defines the methods that a memory management policy should implement.
Routine is an interface for routines, which defines all the methods.
Tracker is an interface for memory tracking.
# Type aliases
CommandStatus represents the status of a command execution.
HeatForecasterCreator is a function type that creates a new instance of HeatForecaster.
HeatRanges is a slice of HeatRange pointers.
Heats stores the heatRanges information for the pid.
MoverTaskHandlerStatus represents the status of the task handler.
Node represents a numa node.
PidWatcherCreator is a function type for creating a new PID watcher instance.
PolicyCreator is a function that creates an instance of a Policy.
RoutineCreator is a function type that creates a new instance of a routine.
TrackerCounters is a slice of TrackerCounter instances.
TrackerCreator is a function type to create a new Tracker instance.