Skip to contentSkip to conversation

rename qemu_malloc and related to glib names for coherence

PATCH Applied Frediano Ziglio 3 participants 3 messages Aug 31, 2011 – Sep 2, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rename qemu_malloc and related to glib names for coherence

---
 trace-events |   10 +++++-----
 vl.c         |    6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)
trace-events +5 -5
index dc300a2..37da2e0 100644
@@ -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"
vl.c +3 -3
index 9cd67a3..f71221b 100644
@@ -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);
 }
 
Signature · 1 line
1.7.1
#2 lore raw
In reply to Frediano Ziglio
Quoted 1 line · Frediano Ziglio

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 61 lines
---
  trace-events |   10 +++++-----
  vl.c         |    6 +++---
  2 files changed, 8 insertions(+), 8 deletions(-)
trace-events +5 -5
index dc300a2..37da2e0 100644
@@ -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"
vl.c +3 -3
index 9cd67a3..f71221b 100644
@@ -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);
  }