Expand description
Memory tracking and visualization tools for Rust applications.
This crate provides tools for tracking memory allocations and visualizing memory usage in Rust applications. It includes a custom global allocator that tracks all heap allocations and deallocations, and provides utilities for exporting memory usage data in various formats.
Re-exports§
pub use capture::backends::global_tracking::global_tracker;pub use capture::backends::global_tracking::init_global_tracking;pub use capture::backends::global_tracking::init_global_tracking_with_config;pub use capture::backends::global_tracking::is_initialized;pub use capture::backends::global_tracking::GlobalTracker;pub use capture::backends::global_tracking::GlobalTrackerConfig;pub use capture::backends::global_tracking::GlobalTrackerStats;pub use capture::backends::global_tracking::TrackerConfig;pub use capture::backends::bottleneck_analysis::BottleneckKind;pub use capture::backends::bottleneck_analysis::PerformanceIssue;pub use capture::backends::hotspot_analysis::CallStackHotspot;pub use capture::backends::hotspot_analysis::MemoryUsagePeak;pub use capture::backends::configure_tracking_strategy;pub use capture::backends::get_tracker as get_capture_tracker;pub use capture::backends::AllocationCategory;pub use capture::backends::AnalysisSummary;pub use capture::backends::AsyncAllocation;pub use capture::backends::AsyncBackend;pub use capture::backends::AsyncMemorySnapshot;pub use capture::backends::AsyncSnapshot;pub use capture::backends::AsyncStats;pub use capture::backends::AsyncTracker;pub use capture::backends::CoreBackend;pub use capture::backends::Event;pub use capture::backends::EventType;pub use capture::backends::FrequencyData;pub use capture::backends::FrequencyPattern;pub use capture::backends::InteractionType;pub use capture::backends::LockfreeAnalysis;pub use capture::backends::LockfreeBackend;pub use capture::backends::RuntimeEnvironment;pub use capture::backends::SamplingConfig;pub use capture::backends::SystemMetrics;pub use capture::backends::TaskInfo;pub use capture::backends::TaskMemoryProfile;pub use capture::backends::ThreadInteraction;pub use capture::backends::ThreadLocalTracker;pub use capture::backends::ThreadStats;pub use capture::backends::TrackedFuture;pub use capture::backends::TrackingStrategy;pub use capture::backends::UnifiedBackend;pub use capture::backends::is_tracking;pub use capture::backends::memory_snapshot;pub use capture::backends::quick_trace;pub use capture::backends::stop_tracing;pub use capture::backends::trace_all;pub use capture::backends::trace_thread;pub use capture::types::AllocationInfo;pub use capture::types::SmartPointerInfo;pub use capture::types::TrackingError;pub use capture::types::TrackingResult;pub use capture::CaptureBackend;pub use capture::CaptureBackendType;pub use capture::CaptureEngine;pub use core::allocator::TrackingAllocator;pub use core::tracker::get_tracker;pub use core::tracker::MemoryTracker;pub use core::ExportMode;pub use core::ExportOptions;pub use core::MemScopeError;pub use core::MemScopeResult;pub use analyzer::AnalysisReport;pub use analyzer::Analyzer;pub use analyzer::ClassificationAnalysis;pub use analyzer::ClassificationSummary;pub use analyzer::CycleReport;pub use analyzer::DetectionAnalysis;pub use analyzer::ExportEngine;pub use analyzer::GraphAnalysis;pub use analyzer::LeakReport;pub use analyzer::MetricsAnalysis;pub use analyzer::MetricsReport;pub use analyzer::SafetyAnalysis;pub use analyzer::SafetySummary;pub use analyzer::TimelineAnalysis;pub use analyzer::TypeCategory;pub use analyzer::TypeClassification;pub use view::FilterBuilder;pub use view::MemoryView;pub use view::ViewStats;pub use snapshot::engine::SnapshotEngine;pub use snapshot::memory::BoundedHistory;pub use snapshot::memory::BoundedHistoryConfig;pub use snapshot::memory::BoundedHistoryStats;pub use snapshot::memory::MemoryConfig;pub use snapshot::memory::TimestampedEntry;pub use snapshot::types::ActiveAllocation;pub use snapshot::types::MemorySnapshot;pub use snapshot::types::MemoryStats;pub use snapshot::types::ThreadMemoryStats;pub use analysis::*;
Modules§
- analysis
- Advanced memory analysis functionality Memory analysis functionality
- analysis_
engine - Analysis Engine - Memory analysis logic Analysis Engine - Memory analysis logic
- analyzer
- Analyzer Module - Unified analysis entry point Analyzer Module - Unified analysis entry point.
- capture
- Capture Engine - Event capture backend
- core
- Core memory tracking functionality Core memory tracking functionality
- error
- Unified error handling and recovery system Unified error handling system for MemScope
- event_
store - Event Store Engine - Centralized event storage Event Store Engine
- facade
- Facade API - Unified user interface Facade API - Unified user interface
- memory
- Memory management utilities
- metadata
- Metadata Engine - Centralized metadata management Metadata Engine - Centralized metadata management
- query
- Query Engine - Unified query interface Query Engine - Unified query interface
- render_
engine - Render Engine - Output rendering Render Engine - Output rendering
- snapshot
- Snapshot Engine - Snapshot construction and aggregation Snapshot Engine - Snapshot construction and aggregation
- task_
registry - Task Registry - Unified task tracking and relationship management Task Registry for unified task tracking
- timeline
- Timeline Engine - Time-based memory analysis Timeline Engine - Time-based memory analysis
- tracker
- Unified Tracker API - Simple, unified interface for memory tracking Unified Tracker API - Enhanced Version
- tracking
- Memory allocation tracking statistics and monitoring Memory tracking module
- utils
- Utility functions Common utility functions shared across modules
- variable_
registry - Variable registry for lightweight HashMap-based variable tracking Variable Registry - Simple HashMap-based variable name tracking
- view
- View Module - Unified read-only access to memory data View Module - Unified read-only access to memory data.
Macros§
- export_
memory_ json - Export memory data to JSON and print the result
- memscope_
summary - Get a memory snapshot and display summary
- safe_
lock - Macro for safe lock acquisition
- show_
top_ allocations - Get top allocations and display them
- track
- track_
clone - track_
ffi_ alloc - Macro for tracking FFI allocations
- track_
scope - Macro for tracking scopes with automatic cleanup
- track_
unsafe_ alloc - Macro for tracking unsafe allocations
- track_
var_ with_ scope - Enhanced track_var macro that also associates with current scope
- tracker
Traits§
- Trackable
- Trait for types that can be tracked by the memory tracker.
Functions§
- analyzer
- Create analyzer from GlobalTracker (recommended entry point).
- init_
logging - Initialize logging system for memscope-rs.
Derive Macros§
- Trackable
- Derive macro for automatically implementing the
Trackabletrait.