ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: Hugh Sasse <hgs@dmu.ac.uk>
To: ruby-core@ruby-lang.org
Subject: Re: gc.c -- possible logic error?
Date: Wed, 3 Oct 2007 22:54:33 +0900	[thread overview]
Message-ID: <Pine.GSO.4.64.0710031440280.8105@brains.eng.cse.dmu.ac.uk> (raw)
In-Reply-To: <Pine.GSO.4.64.0710031302370.8105@brains.eng.cse.dmu.ac.uk>

On Wed, 3 Oct 2007, Hugh Sasse wrote:

> On Wed, 3 Oct 2007, Eric Hodel wrote:
> 
> > It is also here:
> > 
> > http://rubyforge.org/frs/download.php/12818/mem_inspect-1.0.0.gem
> > 
> For anyone else about to try this:
        [...]
> All the routes through the ruby_mem_inspect_build script assume cvs.
> I've enough information to work around that, I think.

OK, I've managed that.  The results could do with some interpretation.

http://www.eng.cse.dmu.ac.uk/~hgs/ruby/memory_map.18681.1191417911.png

that is for:

http://www.eng.cse.dmu.ac.uk/~hgs/ruby/hashes_read_yaml.rb

leaving it to finish its sleep.

My modified ruby_mem_inspect_build is:
<quote>
#!/scratch/hgs/local/bin/ruby -w
##!/usr/local/bin/ruby -w

require 'rubygems'
require 'rake'

# ruby_dir = "mem_inspect_ruby_1_8"
ruby_dir = "/scratch/hgs/ruby-1.8.6-p110"
old_pwd = Dir.pwd
CVS = false
SVN = false
# PREFIX = "/usr/local"
PREFIX = "/scratch/hgs/local"

# Sun's patch and make are usually not up to snuff. Set these as 
# apppropriate.   (Ruby could do with something to search ENV['PATH'])
MAKE = "gmake"
PATCH = "gpatch"

if File.exist? ruby_dir then
  Dir.chdir ruby_dir do 
    "sh cvs up" if CVS
  end
else
  sh "cvs -z4 -d :pserver:anonymous@cvs.ruby-lang.org:/src co -d #{ruby_dir} -r ruby_1_8 ruby" if CVS
end

Dir.chdir ruby_dir do
  if CVS
    # Why delete and update if we have just got it?
    sh "rm gc.c"
    sh "cvs up gc.c"
  end
  sh "#{PATCH} < #{File.join old_pwd, "gc.c.patch"}"
  sh "autoconf" unless File.exist? "configure"
  sh "./configure --prefix=#{PREFIX} --program-suffix=_mem_inspect" unless File.exist? "Makefile"
  sh MAKE

  puts "*" * 80
  puts "Ruby has been built in #{ruby_dir}, but not installed"
  puts
  puts "If you run:"
  puts
  puts "\tcd #{ruby_dir}; sudo #{MAKE} install"
  puts
  puts "YOU WILL OVERWRITE YOUR STDLIB"
  puts
  puts "Generally, this is harmless, but you may not want that."
  puts "So I'll let you do that all by yourself."
  puts
  puts "You may now run ruby_mem_dump using the patched ruby:"
  puts
  puts "\t#{File.join ruby_dir, "ruby_mem_inspect"} -S ruby_mem_dump"
  puts
  puts "If you haven't installed mem_inspect:"
  puts
  puts "\t#{File.join ruby_dir, "ruby_mem_inspect"} -Ilib bin/ruby_mem_dump"
  puts
  puts "*" * 80
end

</quote>


I don't think I can take this any further, alas: I don't know how to get
meaningful data about which parts of the code create what in memory, how
to find which points of the memory map are salient, and how to extract
how these things change with time.

        Thank you,
        Hugh

  reply	other threads:[~2007-10-03 13:56 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-28 12:57 gc.c -- possible logic error? Hugh Sasse
2007-09-28 16:04 ` Yukihiro Matsumoto
2007-09-28 17:46   ` Hugh Sasse
2007-09-28 18:54     ` Hugh Sasse
2007-09-28 17:36 ` MenTaLguY
2007-09-28 17:58   ` Hugh Sasse
2007-09-28 18:49     ` MenTaLguY
2007-09-28 18:56       ` Hugh Sasse
2007-09-28 19:23       ` MenTaLguY
2007-09-28 20:54         ` Joel VanderWerf
2007-09-29  6:09   ` Yukihiro Matsumoto
2007-09-30  4:31 ` Tanaka Akira
2007-09-30  4:35   ` Tanaka Akira
2007-10-01 13:48 ` Sylvain Joyeux
2007-10-01 15:56   ` Hugh Sasse
2007-10-01 16:51 ` Tanaka Akira
2007-10-01 17:09   ` Hugh Sasse
2007-10-01 17:29     ` Tanaka Akira
2007-10-01 17:54       ` Hugh Sasse
2007-10-01 19:43         ` Berger, Daniel
2007-10-02 10:47           ` Hugh Sasse
2007-10-01 20:32         ` Eric Hodel
2007-10-02 11:16           ` Hugh Sasse
2007-10-02 18:47             ` Eric Hodel
2007-10-02 19:50               ` Hugh Sasse
2007-10-03 12:27               ` Hugh Sasse
2007-10-03 13:54                 ` Hugh Sasse [this message]
2007-10-03 15:56                 ` Eric Hodel
2007-10-01 17:34 ` Sylvain Joyeux
2007-10-01 18:08   ` Hugh Sasse
2007-10-02  7:36 ` Sylvain Joyeux
2007-10-02  9:26   ` Hugh Sasse
2007-10-02 13:58     ` Hugh Sasse
2007-10-02 16:29     ` Joel VanderWerf
2007-10-02 16:39       ` Hugh Sasse
2007-10-03  7:33 ` [SUMMARY] " Sylvain Joyeux
  -- strict thread matches above, loose matches on Subject: below --
2007-10-01 18:19 Brent Roman
2007-10-01 18:39 ` Hugh Sasse
2007-10-02  7:20 ` Sylvain Joyeux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.64.0710031440280.8105@brains.eng.cse.dmu.ac.uk \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).