Skip to content

chrisa/lua-usdt

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

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

About

libusdt bindings for Lua

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published