* [Qemu-devel] [PATCH 1/1] unbreak dtrace tracing due to double _ in rdma names
@ 2015-02-16 16:58 Dr. David Alan Gilbert (git)
2015-02-16 17:06 ` Paolo Bonzini
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2015-02-16 16:58 UTC (permalink / raw)
To: qemu-devel; +Cc: amit.shah, afaerber, stefanha, quintela
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
It looks like the dtrace trace code gets upset if you have trace names
with __ in, which the migration/rdma.c code does.
Rename the functions and the associated traces.
Fixes: 733252deb8b7d37beacda5976c2769e18642b2fa
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reported-by: Andreas Färber <afaerber@suse.de>
---
migration/rdma.c | 24 +++++++++++-------------
trace-events | 4 ++--
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/migration/rdma.c b/migration/rdma.c
index fc351ea..e7d77f6 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -510,7 +510,7 @@ static inline uint8_t *ram_chunk_end(const RDMALocalBlock *rdma_ram_block,
return result;
}
-static int __qemu_rdma_add_block(RDMAContext *rdma, void *host_addr,
+static int rdma_add_block(RDMAContext *rdma, void *host_addr,
ram_addr_t block_offset, uint64_t length)
{
RDMALocalBlocks *local = &rdma->local_ram_blocks;
@@ -551,13 +551,12 @@ static int __qemu_rdma_add_block(RDMAContext *rdma, void *host_addr,
g_hash_table_insert(rdma->blockmap, (void *) block_offset, block);
- trace___qemu_rdma_add_block(local->nb_blocks,
- (uint64_t) block->local_host_addr, block->offset,
- block->length,
- (uint64_t) (block->local_host_addr + block->length),
- BITS_TO_LONGS(block->nb_chunks) *
- sizeof(unsigned long) * 8,
- block->nb_chunks);
+ trace_rdma_add_block(local->nb_blocks, (uint64_t) block->local_host_addr,
+ block->offset, block->length,
+ (uint64_t) (block->local_host_addr + block->length),
+ BITS_TO_LONGS(block->nb_chunks) *
+ sizeof(unsigned long) * 8,
+ block->nb_chunks);
local->nb_blocks++;
@@ -572,7 +571,7 @@ static int __qemu_rdma_add_block(RDMAContext *rdma, void *host_addr,
static void qemu_rdma_init_one_block(void *host_addr,
ram_addr_t block_offset, ram_addr_t length, void *opaque)
{
- __qemu_rdma_add_block(opaque, host_addr, block_offset, length);
+ rdma_add_block(opaque, host_addr, block_offset, length);
}
/*
@@ -595,7 +594,7 @@ static int qemu_rdma_init_ram_blocks(RDMAContext *rdma)
return 0;
}
-static int __qemu_rdma_delete_block(RDMAContext *rdma, ram_addr_t block_offset)
+static int rdma_delete_block(RDMAContext *rdma, ram_addr_t block_offset)
{
RDMALocalBlocks *local = &rdma->local_ram_blocks;
RDMALocalBlock *block = g_hash_table_lookup(rdma->blockmap,
@@ -657,7 +656,7 @@ static int __qemu_rdma_delete_block(RDMAContext *rdma, ram_addr_t block_offset)
local->block = NULL;
}
- trace___qemu_rdma_delete_block(local->nb_blocks,
+ trace_rdma_delete_block(local->nb_blocks,
(uint64_t)block->local_host_addr,
block->offset, block->length,
(uint64_t)(block->local_host_addr + block->length),
@@ -2190,8 +2189,7 @@ static void qemu_rdma_cleanup(RDMAContext *rdma)
if (rdma->local_ram_blocks.block) {
while (rdma->local_ram_blocks.nb_blocks) {
- __qemu_rdma_delete_block(rdma,
- rdma->local_ram_blocks.block->offset);
+ rdma_delete_block(rdma, rdma->local_ram_blocks.block->offset);
}
}
diff --git a/trace-events b/trace-events
index 57f357f..378505f 100644
--- a/trace-events
+++ b/trace-events
@@ -1337,8 +1337,6 @@ migrate_pending(uint64_t size, uint64_t max) "pending size %" PRIu64 " max %" PR
migrate_transferred(uint64_t tranferred, uint64_t time_spent, double bandwidth, uint64_t size) "transferred %" PRIu64 " time_spent %" PRIu64 " bandwidth %g max_size %" PRId64
# migration/rdma.c
-__qemu_rdma_add_block(int block, uint64_t addr, uint64_t offset, uint64_t len, uint64_t end, uint64_t bits, int chunks) "Added Block: %d, addr: %" PRIu64 ", offset: %" PRIu64 " length: %" PRIu64 " end: %" PRIu64 " bits %" PRIu64 " chunks %d"
-__qemu_rdma_delete_block(int block, uint64_t addr, uint64_t offset, uint64_t len, uint64_t end, uint64_t bits, int chunks) "Deleted Block: %d, addr: %" PRIu64 ", offset: %" PRIu64 " length: %" PRIu64 " end: %" PRIu64 " bits %" PRIu64 " chunks %d"
qemu_dma_accept_incoming_migration(void) ""
qemu_dma_accept_incoming_migration_accepted(void) ""
qemu_rdma_accept_pin_state(bool pin) "%d"
@@ -1392,6 +1390,8 @@ qemu_rdma_write_one_recvregres(int mykey, int theirkey, uint64_t chunk) "Receive
qemu_rdma_write_one_sendreg(uint64_t chunk, int len, int index, int64_t offset) "Sending registration request chunk %" PRIu64 " for %d bytes, index: %d, offset: %" PRId64
qemu_rdma_write_one_top(uint64_t chunks, uint64_t size) "Writing %" PRIu64 " chunks, (%" PRIu64 " MB)"
qemu_rdma_write_one_zero(uint64_t chunk, int len, int index, int64_t offset) "Entire chunk is zero, sending compress: %" PRIu64 " for %d bytes, index: %d, offset: %" PRId64
+rdma_add_block(int block, uint64_t addr, uint64_t offset, uint64_t len, uint64_t end, uint64_t bits, int chunks) "Added Block: %d, addr: %" PRIu64 ", offset: %" PRIu64 " length: %" PRIu64 " end: %" PRIu64 " bits %" PRIu64 " chunks %d"
+rdma_delete_block(int block, uint64_t addr, uint64_t offset, uint64_t len, uint64_t end, uint64_t bits, int chunks) "Deleted Block: %d, addr: %" PRIu64 ", offset: %" PRIu64 " length: %" PRIu64 " end: %" PRIu64 " bits %" PRIu64 " chunks %d"
rdma_start_incoming_migration(void) ""
rdma_start_incoming_migration_after_dest_init(void) ""
rdma_start_incoming_migration_after_rdma_listen(void) ""
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH 1/1] unbreak dtrace tracing due to double _ in rdma names
2015-02-16 16:58 [Qemu-devel] [PATCH 1/1] unbreak dtrace tracing due to double _ in rdma names Dr. David Alan Gilbert (git)
@ 2015-02-16 17:06 ` Paolo Bonzini
2015-02-16 18:03 ` Andreas Färber
2015-02-18 10:52 ` Stefan Hajnoczi
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2015-02-16 17:06 UTC (permalink / raw)
To: Dr. David Alan Gilbert (git), qemu-devel
Cc: amit.shah, afaerber, stefanha, quintela
On 16/02/2015 17:58, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> It looks like the dtrace trace code gets upset if you have trace names
> with __ in, which the migration/rdma.c code does.
>
> Rename the functions and the associated traces.
>
> Fixes: 733252deb8b7d37beacda5976c2769e18642b2fa
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Reported-by: Andreas Färber <afaerber@suse.de>
> ---
> migration/rdma.c | 24 +++++++++++-------------
> trace-events | 4 ++--
> 2 files changed, 13 insertions(+), 15 deletions(-)
>
> diff --git a/migration/rdma.c b/migration/rdma.c
> index fc351ea..e7d77f6 100644
> --- a/migration/rdma.c
> +++ b/migration/rdma.c
> @@ -510,7 +510,7 @@ static inline uint8_t *ram_chunk_end(const RDMALocalBlock *rdma_ram_block,
> return result;
> }
>
> -static int __qemu_rdma_add_block(RDMAContext *rdma, void *host_addr,
> +static int rdma_add_block(RDMAContext *rdma, void *host_addr,
> ram_addr_t block_offset, uint64_t length)
> {
> RDMALocalBlocks *local = &rdma->local_ram_blocks;
> @@ -551,13 +551,12 @@ static int __qemu_rdma_add_block(RDMAContext *rdma, void *host_addr,
>
> g_hash_table_insert(rdma->blockmap, (void *) block_offset, block);
>
> - trace___qemu_rdma_add_block(local->nb_blocks,
> - (uint64_t) block->local_host_addr, block->offset,
> - block->length,
> - (uint64_t) (block->local_host_addr + block->length),
> - BITS_TO_LONGS(block->nb_chunks) *
> - sizeof(unsigned long) * 8,
> - block->nb_chunks);
> + trace_rdma_add_block(local->nb_blocks, (uint64_t) block->local_host_addr,
> + block->offset, block->length,
> + (uint64_t) (block->local_host_addr + block->length),
> + BITS_TO_LONGS(block->nb_chunks) *
> + sizeof(unsigned long) * 8,
> + block->nb_chunks);
>
> local->nb_blocks++;
>
> @@ -572,7 +571,7 @@ static int __qemu_rdma_add_block(RDMAContext *rdma, void *host_addr,
> static void qemu_rdma_init_one_block(void *host_addr,
> ram_addr_t block_offset, ram_addr_t length, void *opaque)
> {
> - __qemu_rdma_add_block(opaque, host_addr, block_offset, length);
> + rdma_add_block(opaque, host_addr, block_offset, length);
> }
>
> /*
> @@ -595,7 +594,7 @@ static int qemu_rdma_init_ram_blocks(RDMAContext *rdma)
> return 0;
> }
>
> -static int __qemu_rdma_delete_block(RDMAContext *rdma, ram_addr_t block_offset)
> +static int rdma_delete_block(RDMAContext *rdma, ram_addr_t block_offset)
> {
> RDMALocalBlocks *local = &rdma->local_ram_blocks;
> RDMALocalBlock *block = g_hash_table_lookup(rdma->blockmap,
> @@ -657,7 +656,7 @@ static int __qemu_rdma_delete_block(RDMAContext *rdma, ram_addr_t block_offset)
> local->block = NULL;
> }
>
> - trace___qemu_rdma_delete_block(local->nb_blocks,
> + trace_rdma_delete_block(local->nb_blocks,
> (uint64_t)block->local_host_addr,
> block->offset, block->length,
> (uint64_t)(block->local_host_addr + block->length),
> @@ -2190,8 +2189,7 @@ static void qemu_rdma_cleanup(RDMAContext *rdma)
>
> if (rdma->local_ram_blocks.block) {
> while (rdma->local_ram_blocks.nb_blocks) {
> - __qemu_rdma_delete_block(rdma,
> - rdma->local_ram_blocks.block->offset);
> + rdma_delete_block(rdma, rdma->local_ram_blocks.block->offset);
> }
> }
>
> diff --git a/trace-events b/trace-events
> index 57f357f..378505f 100644
> --- a/trace-events
> +++ b/trace-events
> @@ -1337,8 +1337,6 @@ migrate_pending(uint64_t size, uint64_t max) "pending size %" PRIu64 " max %" PR
> migrate_transferred(uint64_t tranferred, uint64_t time_spent, double bandwidth, uint64_t size) "transferred %" PRIu64 " time_spent %" PRIu64 " bandwidth %g max_size %" PRId64
>
> # migration/rdma.c
> -__qemu_rdma_add_block(int block, uint64_t addr, uint64_t offset, uint64_t len, uint64_t end, uint64_t bits, int chunks) "Added Block: %d, addr: %" PRIu64 ", offset: %" PRIu64 " length: %" PRIu64 " end: %" PRIu64 " bits %" PRIu64 " chunks %d"
> -__qemu_rdma_delete_block(int block, uint64_t addr, uint64_t offset, uint64_t len, uint64_t end, uint64_t bits, int chunks) "Deleted Block: %d, addr: %" PRIu64 ", offset: %" PRIu64 " length: %" PRIu64 " end: %" PRIu64 " bits %" PRIu64 " chunks %d"
> qemu_dma_accept_incoming_migration(void) ""
> qemu_dma_accept_incoming_migration_accepted(void) ""
> qemu_rdma_accept_pin_state(bool pin) "%d"
> @@ -1392,6 +1390,8 @@ qemu_rdma_write_one_recvregres(int mykey, int theirkey, uint64_t chunk) "Receive
> qemu_rdma_write_one_sendreg(uint64_t chunk, int len, int index, int64_t offset) "Sending registration request chunk %" PRIu64 " for %d bytes, index: %d, offset: %" PRId64
> qemu_rdma_write_one_top(uint64_t chunks, uint64_t size) "Writing %" PRIu64 " chunks, (%" PRIu64 " MB)"
> qemu_rdma_write_one_zero(uint64_t chunk, int len, int index, int64_t offset) "Entire chunk is zero, sending compress: %" PRIu64 " for %d bytes, index: %d, offset: %" PRId64
> +rdma_add_block(int block, uint64_t addr, uint64_t offset, uint64_t len, uint64_t end, uint64_t bits, int chunks) "Added Block: %d, addr: %" PRIu64 ", offset: %" PRIu64 " length: %" PRIu64 " end: %" PRIu64 " bits %" PRIu64 " chunks %d"
> +rdma_delete_block(int block, uint64_t addr, uint64_t offset, uint64_t len, uint64_t end, uint64_t bits, int chunks) "Deleted Block: %d, addr: %" PRIu64 ", offset: %" PRIu64 " length: %" PRIu64 " end: %" PRIu64 " bits %" PRIu64 " chunks %d"
> rdma_start_incoming_migration(void) ""
> rdma_start_incoming_migration_after_dest_init(void) ""
> rdma_start_incoming_migration_after_rdma_listen(void) ""
>
Good thing even if it weren't for the broken tracing.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH 1/1] unbreak dtrace tracing due to double _ in rdma names
2015-02-16 16:58 [Qemu-devel] [PATCH 1/1] unbreak dtrace tracing due to double _ in rdma names Dr. David Alan Gilbert (git)
2015-02-16 17:06 ` Paolo Bonzini
@ 2015-02-16 18:03 ` Andreas Färber
2015-02-18 10:52 ` Stefan Hajnoczi
2 siblings, 0 replies; 4+ messages in thread
From: Andreas Färber @ 2015-02-16 18:03 UTC (permalink / raw)
To: Dr. David Alan Gilbert (git), qemu-devel; +Cc: amit.shah, stefanha, quintela
Am 16.02.2015 um 17:58 schrieb Dr. David Alan Gilbert (git):
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> It looks like the dtrace trace code gets upset if you have trace names
> with __ in, which the migration/rdma.c code does.
>
> Rename the functions and the associated traces.
>
> Fixes: 733252deb8b7d37beacda5976c2769e18642b2fa
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Reported-by: Andreas Färber <afaerber@suse.de>
That fixes it for me, too.
Tested-by: Andreas Färber <afaerber@suse.de>
Thanks a lot,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH 1/1] unbreak dtrace tracing due to double _ in rdma names
2015-02-16 16:58 [Qemu-devel] [PATCH 1/1] unbreak dtrace tracing due to double _ in rdma names Dr. David Alan Gilbert (git)
2015-02-16 17:06 ` Paolo Bonzini
2015-02-16 18:03 ` Andreas Färber
@ 2015-02-18 10:52 ` Stefan Hajnoczi
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2015-02-18 10:52 UTC (permalink / raw)
To: Dr. David Alan Gilbert (git); +Cc: amit.shah, qemu-devel, afaerber, quintela
[-- Attachment #1: Type: text/plain, Size: 736 bytes --]
On Mon, Feb 16, 2015 at 04:58:05PM +0000, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> It looks like the dtrace trace code gets upset if you have trace names
> with __ in, which the migration/rdma.c code does.
>
> Rename the functions and the associated traces.
>
> Fixes: 733252deb8b7d37beacda5976c2769e18642b2fa
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Reported-by: Andreas Färber <afaerber@suse.de>
> ---
> migration/rdma.c | 24 +++++++++++-------------
> trace-events | 4 ++--
> 2 files changed, 13 insertions(+), 15 deletions(-)
Thanks, applied to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-18 10:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-16 16:58 [Qemu-devel] [PATCH 1/1] unbreak dtrace tracing due to double _ in rdma names Dr. David Alan Gilbert (git)
2015-02-16 17:06 ` Paolo Bonzini
2015-02-16 18:03 ` Andreas Färber
2015-02-18 10:52 ` Stefan Hajnoczi
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).