Parcourir la source

Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging

# gpg: Signature made Fri 09 Oct 2015 10:15:13 BST using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"

* remotes/stefanha/tags/tracing-pull-request:
  trace: remove malloc tracing
  docs: update the usage example of "dtrace" backend in tracing.txt

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell il y a 10 ans
Parent
commit
b37686f7e8
3 fichiers modifiés avec 5 ajouts et 35 suppressions
  1. 5 5
      docs/tracing.txt
  2. 0 3
      trace-events
  3. 0 27
      vl.c

+ 5 - 5
docs/tracing.txt

@@ -258,11 +258,11 @@ is generated to make use in scripts more convenient.  This step can also be
 performed manually after a build in order to change the binary name in the .stp
 performed manually after a build in order to change the binary name in the .stp
 probes:
 probes:
 
 
-    scripts/tracetool --dtrace --stap \
-                      --binary path/to/qemu-binary \
-                      --target-type system \
-                      --target-name x86_64 \
-                      <trace-events >qemu.stp
+    scripts/tracetool.py --backends=dtrace --format=stap \
+                         --binary path/to/qemu-binary \
+                         --target-type system \
+                         --target-name x86_64 \
+                         <trace-events >qemu.stp
 
 
 == Trace event properties ==
 == Trace event properties ==
 
 

+ 0 - 3
trace-events

@@ -603,9 +603,6 @@ scsi_request_sense(int target, int lun, int tag) "target %d lun %d tag %d"
 vm_state_notify(int running, int reason) "running %d reason %d"
 vm_state_notify(int running, int reason) "running %d reason %d"
 load_file(const char *name, const char *path) "name %s location %s"
 load_file(const char *name, const char *path) "name %s location %s"
 runstate_set(int new_state) "new state %d"
 runstate_set(int new_state) "new state %d"
-g_malloc(size_t size, void *ptr) "size %zu ptr %p"
-g_realloc(void *ptr, size_t size, void *newptr) "ptr %p size %zu newptr %p"
-g_free(void *ptr) "ptr %p"
 system_wakeup_request(int reason) "reason=%d"
 system_wakeup_request(int reason) "reason=%d"
 qemu_system_shutdown_request(void) ""
 qemu_system_shutdown_request(void) ""
 qemu_system_powerdown_request(void) ""
 qemu_system_powerdown_request(void) ""

+ 0 - 27
vl.c

@@ -2703,26 +2703,6 @@ static const QEMUOption *lookup_opt(int argc, char **argv,
     return popt;
     return popt;
 }
 }
 
 
-static gpointer malloc_and_trace(gsize n_bytes)
-{
-    void *ptr = malloc(n_bytes);
-    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_g_realloc(mem, n_bytes, ptr);
-    return ptr;
-}
-
-static void free_and_trace(gpointer mem)
-{
-    trace_g_free(mem);
-    free(mem);
-}
-
 static int machine_set_property(void *opaque,
 static int machine_set_property(void *opaque,
                                 const char *name, const char *value,
                                 const char *name, const char *value,
                                 Error **errp)
                                 Error **errp)
@@ -2950,11 +2930,6 @@ int main(int argc, char **argv, char **envp)
     bool userconfig = true;
     bool userconfig = true;
     const char *log_mask = NULL;
     const char *log_mask = NULL;
     const char *log_file = NULL;
     const char *log_file = NULL;
-    GMemVTable mem_trace = {
-        .malloc = malloc_and_trace,
-        .realloc = realloc_and_trace,
-        .free = free_and_trace,
-    };
     const char *trace_events = NULL;
     const char *trace_events = NULL;
     const char *trace_file = NULL;
     const char *trace_file = NULL;
     ram_addr_t maxram_size;
     ram_addr_t maxram_size;
@@ -2970,8 +2945,6 @@ int main(int argc, char **argv, char **envp)
     error_set_progname(argv[0]);
     error_set_progname(argv[0]);
     qemu_init_exec_dir(argv[0]);
     qemu_init_exec_dir(argv[0]);
 
 
-    g_mem_set_vtable(&mem_trace);
-
     module_call_init(MODULE_INIT_QOM);
     module_call_init(MODULE_INIT_QOM);
 
 
     qemu_add_opts(&qemu_drive_opts);
     qemu_add_opts(&qemu_drive_opts);