Skip to content

clairexhuang/gc-observability

Repository files navigation

eBPF Project

This repository contains files from my 2022 semester 2 project on 'Diagnosing Garbage Collection Problems with eBPF' (supervised by Professor Steve Blackburn). We use MMTk with the OpenJDK binding.

In this project, we investigate case studies into lock contention and GC scalability.

In the GC scalability study, we measured GC scalability in MMTk and investigated work packets with a focus on ProcessEdges, and SweepChunk. We also investigated object graphs, and measured the overhead of bpftrace. My python script for parsing logfiles is also included.

See my MMTk-Core bpfworkprobe-sweepchunk branch for the exact changes made to MMTk-Core when investigating work packets (in particular, process edges work packets) and GC scalability. See my MMTk-OpenJFK storeedges branch for the exact changes made when tracing outgoing graph edges for each node.

Below are instructions for using eBPF in MMTk on the moma machines. You will need sudo permission.

We use bpftrace. To incorporate tracing with probes into MMTk-Core:

  1. Add probe to [dependencies] in Cargo.toml:
probe = "0.3"
  1. In src/lib.rs, add:
#[macro_use]
extern crate probe;
  1. Place probes in the code, passing mmtk as the first argument, giving a name as the second argument, and adding more arguments where appropriate:
probe!(mmtk,probe_name,arg0,arg1);
  1. Force use of frame pointers and then build MMTk with the instructions in the OpenJDK binding
export RUSTFLAGS=-Cforce-frame-pointers=yes
  1. Write the tracing code. An example is the code which collects statistics about work packets (cumulative time & distribution by packet type). Also, see the reference guide for more information, and the tools page for some sample/existing functionalities.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages