-
-
Save yorickpeterse/3ce2492ba555085ac8fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global allocations | |
probe process("rbx").mark("object__allocate") | |
{ | |
klass = user_string($arg1) | |
file = user_string($arg2) | |
if ( isinstr(file, "httpclient") ) | |
allocations[klass, file] <<< 1 | |
} | |
probe end | |
{ | |
printf("%-40s %-6s %s\n", "Class", "Amount", "File") | |
foreach ( [klass, file] in allocations- ) | |
{ | |
printf("%-40s %-6d %s\n", klass, @count(allocations[klass, file]), file) | |
} | |
delete allocations | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo -E stap /tmp/rbx.stp -c 'rbx /tmp/test.rb' | |
WARNING: Kernel function symbol table missing [man warning::symbols] | |
Class Amount File | |
String 310 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient/session.rb | |
String 78 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient/http.rb | |
String 57 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient.rb | |
String 51 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient/auth.rb | |
HTTPClient::NegotiateAuth 16 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient/auth.rb | |
String 14 /home/yorickpeterse/.gem/rbx/2.1.0/specifications/httpclient-2.5.3.2.gemspec | |
HTTPClient::Site 13 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient/session.rb | |
String 10 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient/cookie.rb | |
String 8 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient/util.rb | |
HTTPClient::SSPINegotiateAuth 8 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient/auth.rb | |
HTTP::Message::Body 8 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient/http.rb | |
HTTP::Message::Headers 8 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient/http.rb | |
String 5 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient/ssl_config.rb | |
WebAgent::CookieManager 4 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient.rb | |
HTTPClient::WWWAuth 4 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient.rb | |
HTTPClient::Connection 4 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient.rb | |
HTTPClient::ProxyDigestAuth 4 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient/auth.rb | |
HTTPClient::SSLConfig 4 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient.rb | |
HTTPClient::Session 4 /home/yorickpeterse/.gem/rbx/2.1.0/gems/httpclient-2.5.3.2/lib/httpclient/session.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'httpclient' | |
4.times do | |
HTTPClient.get('http://httpbin.org/get', :follow_redirect => true) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment