qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Orit Wasserman <owasserm@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: peter.maydell@linaro.org, aliguori@us.ibm.com,
	quintela@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org,
	mdroth@linux.vnet.ibm.com, chegu_vinod@hp.com, avi@redhat.com,
	pbonzini@redhat.com, eblake@redhat.com
Subject: Re: [Qemu-devel] [PATCH v14 07/13] Add debugging infrastructure
Date: Wed, 04 Jul 2012 10:19:13 +0300	[thread overview]
Message-ID: <4FF3EE71.7050608@redhat.com> (raw)
In-Reply-To: <CAAu8pHuDn7MQKJcawLiK8YF-He_JxKV=QZ=K2WJ_qaYS6kwTAg@mail.gmail.com>

On 07/03/2012 10:25 PM, Blue Swirl wrote:
> On Tue, Jul 3, 2012 at 1:52 PM, Orit Wasserman <owasserm@redhat.com> wrote:
>> Signed-off-by: Orit Wasserman <owasserm@redhat.com>
>> ---
>>  arch_init.c |   33 +++++++++++++++++++++++++++------
>>  1 files changed, 27 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch_init.c b/arch_init.c
>> index 9dafb6e..ee20c33 100644
>> --- a/arch_init.c
>> +++ b/arch_init.c
>> @@ -44,6 +44,14 @@
>>  #include "exec-memory.h"
>>  #include "hw/pcspk.h"
>>
>> +#ifdef DEBUG_ARCH_INIT
>> +#define DPRINTF(fmt, ...) \
>> +    do { fprintf(stdout, "arch_init: " fmt, ## __VA_ARGS__); } while (0)
>> +#else
>> +#define DPRINTF(fmt, ...) \
>> +    do { } while (0)
>> +#endif
> 
> I think you missed my comments to the version that Juan sent, about
> using trace points. Also in Juan's version the %lds were changed to
> PRId64s which now are reverted, why?
I will base the next version on top of Juan's. This patch would be removed

Orit
> 
>> +
>>  #ifdef TARGET_SPARC
>>  int graphic_width = 1024;
>>  int graphic_height = 768;
>> @@ -380,6 +388,9 @@ int ram_save_live(QEMUFile *f, int stage, void *opaque)
>>
>>      expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
>>
>> +    DPRINTF("ram_save_live: expected(%ld) <= max(%ld)?\n", expected_time,
>> +        migrate_max_downtime());
>> +
>>      return (stage == 2) && (expected_time <= migrate_max_downtime());
>>  }
>>
>> @@ -416,8 +427,11 @@ static inline void *host_from_stream_offset(QEMUFile *f,
>>  int ram_load(QEMUFile *f, void *opaque, int version_id)
>>  {
>>      ram_addr_t addr;
>> -    int flags;
>> +    int flags, ret = 0;
>>      int error;
>> +    static uint64_t seq_iter;
>> +
>> +    seq_iter++;
>>
>>      if (version_id < 4 || version_id > 4) {
>>          return -EINVAL;
>> @@ -447,8 +461,10 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
>>
>>                      QLIST_FOREACH(block, &ram_list.blocks, next) {
>>                          if (!strncmp(id, block->idstr, sizeof(id))) {
>> -                            if (block->length != length)
>> -                                return -EINVAL;
>> +                            if (block->length != length) {
>> +                                ret =  -EINVAL;
>> +                                goto done;
>> +                            }
>>                              break;
>>                          }
>>                      }
>> @@ -456,7 +472,8 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
>>                      if (!block) {
>>                          fprintf(stderr, "Unknown ramblock \"%s\", cannot "
>>                                  "accept migration\n", id);
>> -                        return -EINVAL;
>> +                        ret = -EINVAL;
>> +                        goto done;
>>                      }
>>
>>                      total_ram_bytes -= length;
>> @@ -490,11 +507,15 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
>>          }
>>          error = qemu_file_get_error(f);
>>          if (error) {
>> -            return error;
>> +            ret = error;
>> +            goto done;
>>          }
>>      } while (!(flags & RAM_SAVE_FLAG_EOS));
>>
>> -    return 0;
>> +done:
>> +    DPRINTF("Completed load of VM with exit code %d seq iteration %ld\n",
>> +            ret, seq_iter);
>> +    return ret;
>>  }
>>
>>  #ifdef HAS_AUDIO
>> --
>> 1.7.7.6
>>

  reply	other threads:[~2012-07-04  7:19 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-03 13:52 [Qemu-devel] [PATCH v14 00/13] XBZRLE delta for live migration of large memory app Orit Wasserman
2012-07-03 13:52 ` [Qemu-devel] [PATCH v14 01/13] Add MigrationParams structure Orit Wasserman
2012-07-03 13:52 ` [Qemu-devel] [PATCH v14 02/13] Add migration capabilities Orit Wasserman
2012-07-03 18:36   ` Eric Blake
2012-07-05 10:09     ` Orit Wasserman
2012-07-03 13:52 ` [Qemu-devel] [PATCH v14 03/13] Add XBZRLE documentation Orit Wasserman
2012-07-03 19:45   ` Eric Blake
2012-07-04  8:29     ` Orit Wasserman
2012-07-03 13:52 ` [Qemu-devel] [PATCH v14 04/13] Add cache handling functions Orit Wasserman
2012-07-03 19:23   ` Blue Swirl
2012-07-03 19:49     ` Eric Blake
2012-07-04  7:04       ` Orit Wasserman
2012-07-03 20:24   ` Eric Blake
2012-07-03 13:52 ` [Qemu-devel] [PATCH v14 05/13] Add uleb encoding/decoding functions Orit Wasserman
2012-07-03 13:52 ` [Qemu-devel] [PATCH v14 06/13] Add save_block_hdr function Orit Wasserman
2012-07-03 13:52 ` [Qemu-devel] [PATCH v14 07/13] Add debugging infrastructure Orit Wasserman
2012-07-03 19:25   ` Blue Swirl
2012-07-04  7:19     ` Orit Wasserman [this message]
2012-07-03 13:52 ` [Qemu-devel] [PATCH v14 08/13] Change ram_save_block to return -1 if there are no more changes Orit Wasserman
2012-07-03 13:52 ` [Qemu-devel] [PATCH v14 09/13] Add migration_end function Orit Wasserman
2012-07-03 20:38   ` Eric Blake
2012-07-04  7:19     ` Orit Wasserman
2012-07-03 13:52 ` [Qemu-devel] [PATCH v14 10/13] Add xbzrle_encode_buffer and xbzrle_decode_buffer functions Orit Wasserman
2012-07-03 21:32   ` Eric Blake
2012-07-03 21:39     ` Eric Blake
2012-07-04  0:20       ` Eric Blake
2012-07-04 12:51         ` Orit Wasserman
2012-07-04  7:24     ` Orit Wasserman
2012-07-04 11:36       ` Eric Blake
2012-07-03 13:52 ` [Qemu-devel] [PATCH v14 11/13] Add XBZRLE to ram_save_block and ram_save_live Orit Wasserman
2012-07-03 13:52 ` [Qemu-devel] [PATCH v14 12/13] Add set_cachesize command Orit Wasserman
2012-07-03 13:52 ` [Qemu-devel] [PATCH v14 13/13] Add XBZRLE statistics Orit Wasserman
2012-07-04  1:35   ` Eric Blake

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=4FF3EE71.7050608@redhat.com \
    --to=owasserm@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=chegu_vinod@hp.com \
    --cc=eblake@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@gmail.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;
as well as URLs for NNTP newsgroup(s).