관리-도구
편집 파일: sizeof.stp
#!/usr/bin/stap # Usage: sizeof.stp TYPENAME # sizeof.stp TYPENAME kernelmodule # sizeof.stp TYPENAME /usr/bin/executable # sizeof.stp TYPENAME kernel<include/linux/someheader.h> # sizeof.stp TYPENAME </usr/include/someheader.h> probe oneshot { println("type ", @1, %( $# > 1 %? " in ", @2, %) /* module or header file name */ " byte-size: ", %( $# > 1 %? @cast_module_sizeof(@2, @1) %: @cast_sizeof(@1) %) ) }