Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: Toby Haynes <thaynes@ca.ibm.com>,
	Edward Peschko <horos11@gmail.com>,
	 	Marc Khouzam <marc.khouzam@ericsson.com>
Cc: gdb@sourceware.org
Subject: Re: industrial use of 'record' and replay.
Date: Thu, 11 Jun 2009 01:42:00 -0000	[thread overview]
Message-ID: <daef60380906101842p6b5b63d8gce93f2d2c39cbd5f@mail.gmail.com> (raw)
In-Reply-To: <OF7F3FA209.A7FB1B89-ON852575CB.006FC945-852575D0.006C03D0@ca.ibm.com>

On Wed, Jun 10, 2009 at 03:39, Toby Haynes<thaynes@ca.ibm.com> wrote:
>> Edward Peschko <horos11@gmail.com>
>> What I want to do is record a program, but not necessarily have to
> replay it
>> from the start of its recording - ie: have the system automatically
>> take 'snapshots'
>> of the state at given intervals, and then have the ability to replay
>> from any given
>> snapshot.
>
> Picking up on this, is it possible to configure the record to use a
> circular buffer, effectively recording only the most recent events? Even
> better if we can specify the size or number of events on that buffer.
>
> If, for example, I wanted to use this to debug a crash problem in a large
> project (where large implies more than 1Gb of source code, with multiple
> processes and threads), being able to set reasonable bounds for recording
> will be critical to make use of this facility. Doubly so in scenarios
> which fail stress tests after more than 24 hours of operation. Being able
> to rewind from the crash point to see precisely what lead to the crash
> would be a killer feature, with huge time savings.
>

I think implement a circular buffer is very hard to precord.  Because
precord need the all the memory of inferior.
But I have another idea to implement the example:
Set 1 breakpoint at the begin of code that you want record and use
"commands" let precord begin work at there.
Set another breakpoint at the end of code that you want record and use
"commands" gcore, dump record message, stop record.
Then, when you want analyze the bug of this code, you can use the core
file(It will help prec get inferior memory) and record dump message to
do it.

Now, prec still not support dump record message and multi-thread.  I
am dealing with them.


Thanks,
Hui


      reply	other threads:[~2009-06-11  1:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02 21:49 Edward Peschko
2009-06-03  1:20 ` Marc Khouzam
2009-06-03  1:50   ` Edward Peschko
2009-06-09 19:41     ` Toby Haynes
2009-06-11  1:42       ` Hui Zhu [this message]

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-all from there: mbox

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

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

  git send-email \
    --in-reply-to=daef60380906101842p6b5b63d8gce93f2d2c39cbd5f@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=horos11@gmail.com \
    --cc=marc.khouzam@ericsson.com \
    --cc=thaynes@ca.ibm.com \
    /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