qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] rename qemu_malloc and related to glib names fo


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] rename qemu_malloc and related to glib names for coherence
Date: Fri, 02 Sep 2011 10:40:29 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Lightning/1.0b2 Thunderbird/3.1.10

On 08/31/2011 02:25 AM, Frediano Ziglio wrote:
Signed-off-by: Frediano Ziglio<address@hidden>

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);
  }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]