| 1 |
title: Watch a Kernel Symbol Using Breakpoint Hardware |
| 2 |
name: hw_watch_sym.stp |
| 3 |
version: 1.0 |
| 4 |
author: William Cohen |
| 5 |
keywords: memory watchpoint |
| 6 |
subsystem: memory |
| 7 |
status: production |
| 8 |
exit: user-controlled |
| 9 |
output: trace |
| 10 |
scope: system-wide |
| 11 |
description: The script will watch accesses to the starting address of a single kernel symbol and prints a traceback each time the symbol is accessed. This script needs to be run as root to allow access to the breakpoint hardware. |
| 12 |
test_support: perf stat -a --event=mem:0x`grep "vm_dirty_ratio" /proc/kallsyms | awk '{print $1}'` /bin/true |
| 13 |
test_check: stap --all-modules -p4 hw_watch_sym.stp vm_dirty_ratio |
| 14 |
test_installcheck: stap --all-modules hw_watch_sym.stp vm_dirty_ratio -T 5 |