| 1 |
title: Print the Size of a C Type |
| 2 |
name: sizeof.stp |
| 3 |
version: 1.0 |
| 4 |
author: anonymous |
| 5 |
keywords: statistics memory bpf |
| 6 |
subsystem: any |
| 7 |
status: proposed |
| 8 |
exit: event-ended |
| 9 |
output: on-exit |
| 10 |
scope: system-wide |
| 11 |
description: This script prints the size of a type, based on dwarf debuginfo for any kernel or userspace module, or trial-compilation of a given header file name. |
| 12 |
test_check: stap -p4 sizeof.stp task_struct 'kernel<include/linux/sched.h>' |
| 13 |
test_installcheck: stap sizeof.stp FILE '</usr/include/stdio.h>' |
| 14 |
test_check_bpf: stap -p4 --bpf sizeof.stp task_struct 'kernel<include/linux/sched.h>' |
| 15 |
test_installcheck_bpf: stap --bpf sizeof.stp FILE '</usr/include/stdio.h>' |