How dcompiler/loca works
loca is a collection of program-locality profiling and cache-policy analysis tools, with a Ruby web interface for browsing and plotting results. A likely workflow is to profile a program, analyze reference traces or simulate replacement policies, then inspect generated data; only parts of that wiring are visible in the sampled source, so uncertain handoffs are omitted.
Main entry points: dual_fp_all.cpp Footprint profiler · OPTStackDistanceAnalyzer.c OPT distance analyzer · lru.py LRU simulator · 2q.py 2Q simulator
Components 19
Profiling
- Footprint profiler
gem/lib/src/Footprint/dual_fp_all.cpp - Footprint histogram
gem/lib/src/Footprint/histo.H - Footprint variants
gem/lib/src/Footprint
Trace Analysis
- OPT distance analyzer
policies/ForwardOPTStackDistanceAnalyzer/OPTStackDistanceAnalyzer.c - OPT trace tools
policies/ForwardOPTStackDistanceAnalyzer
Cache Simulation
- LRU simulator
policies/lru/lru.py - 2Q simulator
policies/2q/2q.py - LFU simulator
policies/lfu/lfu.py - ARC simulator
policies/arc/arc.py - LIRS simulator
policies/lirs/lirs/lirs.c - Lease policy
policies/lc/lc_with_item_size/lease_lru.c
Results Interface
- Result browser
server/server.rb - Plot generation
server/plot.rb - Plot generation
server/plot_p.rb
Other components
- Target program
- Pin runtime
- Reference trace
- Analysis results
- Analyst
Connections 19
- Target program → Pin runtime: executes under
- Pin runtime → Footprint profiler: instruments
- Footprint profiler → Footprint histogram: updates counts
- Footprint profiler → Analysis results: writes profile
- Reference trace → OPT distance analyzer: reads trace
- OPT trace tools → OPT distance analyzer: prepares inputs
- OPT distance analyzer → Analysis results: writes distances
- Reference trace → LRU simulator: reads trace
- Reference trace → 2Q simulator: reads trace
- Reference trace → LFU simulator: reads trace
- Reference trace → ARC simulator: reads trace
- Reference trace → LIRS simulator: reads trace
- LRU simulator → Analysis results: writes MRC
- 2Q simulator → Analysis results: writes MRC
- LFU simulator → Analysis results: writes MRC
- Result browser → Analysis results: browses files
- Analyst → Result browser: requests results
- Plot generation → Analysis results: plots data
- Plot generation → Analysis results: plots data