Patchwork rename qemu_malloc and related to glib names for coherence

login
register
mail settings
Submitter Frediano Ziglio
Date Aug. 31, 2011, 7:25 a.m.
Message ID <1314775535-5736-1-git-send-email-freddy77@gmail.com>
Download mbox | patch
Permalink /patch/112451/
State New
Headers show

Comments

Frediano Ziglio - Aug. 31, 2011, 7:25 a.m.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
---
 trace-events |   10 +++++-----
 vl.c         |    6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)
Stefan Hajnoczi - Aug. 31, 2011, 7:30 a.m.
On Wed, Aug 31, 2011 at 8:25 AM, Frediano Ziglio <freddy77@gmail.com> wrote:
>
> Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
> ---
>  trace-events |   10 +++++-----
>  vl.c         |    6 +++---
>  2 files changed, 8 insertions(+), 8 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Anthony Liguori - Sept. 2, 2011, 3:40 p.m.
On 08/31/2011 02:25 AM, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio<freddy77@gmail.com>

Applied.  Thanks.

Regards,

Anthony Liguori

> ---
>   trace-events |   10 +++++-----
>   vl.c         |    6 +++---
>   2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/trace-events b/trace-events
> index dc300a2..37da2e0 100644
> --- a/trace-events
> +++ b/trace-events
> @@ -14,7 +14,7 @@
>   #
>   # [disable]<name>(<type1>  <arg1>[,<type2>  <arg2>] ...) "<format-string>"
>   #
> -# Example: qemu_malloc(size_t size) "size %zu"
> +# Example: g_malloc(size_t size) "size %zu"
>   #
>   # The "disable" keyword will build without the trace event.
>   # In case of 'simple' trace backend, it will allow the trace event to be
> @@ -28,10 +28,10 @@
>   #
>   # The<format-string>  should be a sprintf()-compatible format string.
>
> -# qemu-malloc.c
> -disable qemu_malloc(size_t size, void *ptr) "size %zu ptr %p"
> -disable qemu_realloc(void *ptr, size_t size, void *newptr) "ptr %p size %zu newptr %p"
> -disable qemu_free(void *ptr) "ptr %p"
> +# vl.c
> +disable g_malloc(size_t size, void *ptr) "size %zu ptr %p"
> +disable g_realloc(void *ptr, size_t size, void *newptr) "ptr %p size %zu newptr %p"
> +disable g_free(void *ptr) "ptr %p"
>
>   # osdep.c
>   disable qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu size %zu ptr %p"
> diff --git a/vl.c b/vl.c
> index 9cd67a3..f71221b 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -2088,20 +2088,20 @@ static const QEMUOption *lookup_opt(int argc, char **argv,
>   static gpointer malloc_and_trace(gsize n_bytes)
>   {
>       void *ptr = malloc(n_bytes);
> -    trace_qemu_malloc(n_bytes, ptr);
> +    trace_g_malloc(n_bytes, ptr);
>       return ptr;
>   }
>
>   static gpointer realloc_and_trace(gpointer mem, gsize n_bytes)
>   {
>       void *ptr = realloc(mem, n_bytes);
> -    trace_qemu_realloc(mem, n_bytes, ptr);
> +    trace_g_realloc(mem, n_bytes, ptr);
>       return ptr;
>   }
>
>   static void free_and_trace(gpointer mem)
>   {
> -    trace_qemu_free(mem);
> +    trace_g_free(mem);
>       free(mem);
>   }
>

Patch

diff --git a/trace-events b/trace-events
index dc300a2..37da2e0 100644
--- a/trace-events
+++ b/trace-events
@@ -14,7 +14,7 @@ 
 #
 # [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
 #
-# Example: qemu_malloc(size_t size) "size %zu"
+# Example: g_malloc(size_t size) "size %zu"
 #
 # The "disable" keyword will build without the trace event.
 # In case of 'simple' trace backend, it will allow the trace event to be
@@ -28,10 +28,10 @@ 
 #
 # The <format-string> should be a sprintf()-compatible format string.
 
-# qemu-malloc.c
-disable qemu_malloc(size_t size, void *ptr) "size %zu ptr %p"
-disable qemu_realloc(void *ptr, size_t size, void *newptr) "ptr %p size %zu newptr %p"
-disable qemu_free(void *ptr) "ptr %p"
+# vl.c
+disable g_malloc(size_t size, void *ptr) "size %zu ptr %p"
+disable g_realloc(void *ptr, size_t size, void *newptr) "ptr %p size %zu newptr %p"
+disable g_free(void *ptr) "ptr %p"
 
 # osdep.c
 disable qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu size %zu ptr %p"
diff --git a/vl.c b/vl.c
index 9cd67a3..f71221b 100644
--- a/vl.c
+++ b/vl.c
@@ -2088,20 +2088,20 @@  static const QEMUOption *lookup_opt(int argc, char **argv,
 static gpointer malloc_and_trace(gsize n_bytes)
 {
     void *ptr = malloc(n_bytes);
-    trace_qemu_malloc(n_bytes, ptr);
+    trace_g_malloc(n_bytes, ptr);
     return ptr;
 }
 
 static gpointer realloc_and_trace(gpointer mem, gsize n_bytes)
 {
     void *ptr = realloc(mem, n_bytes);
-    trace_qemu_realloc(mem, n_bytes, ptr);
+    trace_g_realloc(mem, n_bytes, ptr);
     return ptr;
 }
 
 static void free_and_trace(gpointer mem)
 {
-    trace_qemu_free(mem);
+    trace_g_free(mem);
     free(mem);
 }