Comments (6)
Strange. Do the GC stats work?
Memprof.trace{ 10.times{ GC.start } }
Can you also include the output of memprof --info
from memprof.
$memprof --info
Memprof Uploader
http://www.memprof.com
======================
ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2010.01
CFLAGS='-g -O2 ' ./configure '--prefix=/usr/local/ruby-enterprise-1.8.7-2010.01' '--enable-mbari-api' 'CFLAGS=-g -O2 '
/usr/local/ruby-enterprise-1.8.7-2010.01/bin/ruby: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
libtcmalloc_minimal.so.0 => /usr/local/ruby-enterprise-1.8.7-2010.01/lib/libtcmalloc_minimal.so.0 (0x00002aaaaacc8000)
librt.so.1 => /lib64/librt.so.1 (0x00002aaaaaf1a000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002aaaab123000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002aaaab328000)
libm.so.6 => /lib64/libm.so.6 (0x00002aaaab560000)
libc.so.6 => /lib64/libc.so.6 (0x00002aaaab7e3000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002aaaabb3b000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002aaaabe3b000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aaaac049000)
/lib64/ld-linux-x86-64.so.2 (0x00002aaaaaaab000)
from memprof.
Sorry, missed your first question:
irb(main):002:0> Memprof.trace{ 10.times{ GC.start } }
{
"memcache": {
},
"mysql": {
},
"fd": {
},
"objects": {
"created": 11,
"types": {
"varmap": 11
}
},
"gc": {
"calls": 10,
"time": 0.092604
},
"memory": {
"free": {
"calls": 85413,
"actual": 7756144
}
}
}
from memprof.
It is not currently possible to use the memprof tracer along with other memprof features in the same process. If you call Memprof.start
or include any of the middlewares, the Memprof.trace
object tracer will not work.
Try running:
ruby -rubygems -e' require "memprof"; Memprof.trace{ 10.times{Object.new} } '
This works for me locally, whereas:
ruby -rubygems -e' require "memprof"; Memprof.start; Memprof.trace{ 10.times{Object.new} } '
shows 0 counts for objects created. This is because Memprof.start installs its own hooks into new object creation, causing issues with the tracer later on.
from memprof.
Hm. I don't think I was doing that, but then as you can see from the GC output I pasted, object counts are working now, as is the example I was trying when I first reported it... So, that's strange.
Oh well. I'll re-open this if it happens again.
from memprof.
Ah, no, you're right. Scrollback shows I had done a Memprof.start before that. Good catch!
Maybe a warning / error would be helpful in the future?
from memprof.
Related Issues (20)
- ruby: getshstrndx() failed: no error. HOT 5
- Can't build with 1.8.7p330 HOT 5
- ruby: Failed to insert tramp for mysql_real_query with REE HOT 4
- Document that memprof can't work on Windows HOT 2
- 32-bit version? HOT 1
- Memprof::Tracer fails with Assertion failed in json.c HOT 2
- Symbol not found: __mh_bundle_header
- License? HOT 1
- memprof does not get installed ubuntu (9.10) HOT 2
- Error when calling dump_all HOT 1
- Is this project dead? HOT 4
- trouble installing memprof for profiling a legacy ree app HOT 1
- Line numbers are doubled HOT 2
- Middlewares don't work
- does not install on OS X 10.6.4 HOT 10
- have a 32bit os installed on a 64bit cpu HOT 1
- memprof got installed but fails with segmentation fault HOT 10
- Doesn't work on Ubuntu 10.10 HOT 1
- ruby: Failed to insert tramp for connect HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memprof.