Skip to content

Instantly share code, notes, and snippets.

@nikomatsakis
Created December 14, 2011 22:43
Show Gist options
  • Save nikomatsakis/1478911 to your computer and use it in GitHub Desktop.
Save nikomatsakis/1478911 to your computer and use it in GitHub Desktop.
d-trace script to profile allocations
#!/usr/sbin/dtrace -s
pid$target::upcall_malloc:entry
{
@task[ustack(10)] = count()
}
pid$target::upcall_shared_malloc:entry
{
@task[ustack(10)] = count()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment