Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chrisa/lua-usdt
libusdt bindings for Lua
https://github.com/chrisa/lua-usdt
Last synced: about 2 months ago
JSON representation
libusdt bindings for Lua
- Host: GitHub
- URL: https://github.com/chrisa/lua-usdt
- Owner: chrisa
- Created: 2012-03-27T10:53:36.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-10-06T10:01:34.000Z (over 10 years ago)
- Last Synced: 2024-04-24T11:18:37.904Z (2 months ago)
- Language: C
- Homepage:
- Size: 102 KB
- Stars: 6
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Lists
- awesome-dtrace - lua-usdt - Libusdt bindings for Lua. (Software / Programming languages)
README
lua-usdt
========Lua bindings for libusdt[1].
Build with first:
```
cd libusdt
make
cd ..
```and then:
```
luarocks --local build usdt-0.1-1.rockspec USDT_INCDIR=libusdt
```Test:
```
sudo dtrace -Z \
-n 'lua*:lmod:foo:cprobe{ printf("%s %s %s %s %s %s %s %s %s %s", copyinstr(arg0), copyinstr(arg1), \
copyinstr(arg2), copyinstr(arg3), copyinstr(arg4), copyinstr(arg5), copyinstr(arg6), \
copyinstr(arg7), copyinstr(arg8), copyinstr(arg9)) }' \
-n 'lua*:lmod:foo:iprobe{ printf("%d %d %d %d %d %d %d %d %d %d", arg0, arg1, arg2, arg3, arg4, \
arg5, arg6, arg7, arg8, arg9) }' \
-c 'lua test.lua'
```The output of this should be along the lines of:
```
dtrace: description 'lua*:lmod:foo:cprobe' matched 0 probes
dtrace: description 'lua*:lmod:foo:iprobe' matched 0 probes
dtrace: pid 33227 has exited
CPU ID FUNCTION:NAME
0 3950 foo:iprobe 1 2 3 4 5 6 7 8 9 10
0 3951 foo:cprobe a b c d e f g h i j
```[1] - https://github.com/chrisa/libusdt