Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

สคริปต์ Whamm

Instrumentation (หรือที่เรียกว่ามอนิเตอร์) ถูกแสดงเป็นชุดของโพรบที่มีเพรดิเคตในสคริปต์ที่ใช้นามสกุล .mm

นี่คือภาพรวมระดับสูงของไวยากรณ์สำหรับสคริปต์ Whamm:

// Statements to initialize the global state of the instrumentation
global_statements;
...

// Function definitions to reuse code snippets
fn_name(fn_args) -> ret_val { fn_body; ... }
...

// An example of what a `probe` would look.
// There can be many of these in a monitor.
provider:package:event:mode / predicate / {
  probe_actions;
  ...
}

การทำ instrumentation ด้วย CLI

whamm instr --help

คำสั่ง instr ที่ CLI ให้มาเปิดทางให้นักพัฒนาทำ instrumentation กับโปรแกรมได้จริง