summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2015-11-09 10:32:38 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-25 08:08:10 +0000
commitbc1be0766ce840f7d3ee5501fa52d8030aaa04c5 (patch)
treee7e0906d2d810757746fc8021df1bc231a507b7d /meta
parentbca5a7a2b63411ee1d51cd2112ad9503d5107381 (diff)
downloadpoky-bc1be0766ce840f7d3ee5501fa52d8030aaa04c5.tar.gz
qemu: Backport malloc-trace disabling
Allocation tracing has been removed from GLib 2.46 and trying to use it results in an ugly warning: Backport patch to not use it in Qemu. (From OE-Core rev: 5e6105a90acb86bf7e2c0d5e7fe51e6112080916) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/qemu/qemu/trace-remove-malloc-tracing.patch97
-rw-r--r--meta/recipes-devtools/qemu/qemu_2.4.0.1.bb1
2 files changed, 98 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/trace-remove-malloc-tracing.patch b/meta/recipes-devtools/qemu/qemu/trace-remove-malloc-tracing.patch
new file mode 100644
index 0000000000..73d699f3f8
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/trace-remove-malloc-tracing.patch
@@ -0,0 +1,97 @@
1From 98cf48f60aa4999f5b2808569a193a401a390e6a Mon Sep 17 00:00:00 2001
2From: Paolo Bonzini <pbonzini@redhat.com>
3Date: Wed, 16 Sep 2015 17:38:44 +0200
4Subject: [PATCH] trace: remove malloc tracing
5
6The malloc vtable is not supported anymore in glib, because it broke
7when constructors called g_malloc. Remove tracing of g_malloc,
8g_realloc and g_free calls.
9
10Note that, for systemtap users, glib also provides tracepoints
11glib.mem_alloc, glib.mem_free, glib.mem_realloc, glib.slice_alloc
12and glib.slice_free.
13
14Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
15Reviewed-by: Alberto Garcia <berto@igalia.com>
16Message-id: 1442417924-25831-1-git-send-email-pbonzini@redhat.com
17Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
18
19
20For Yocto:
21Upstream-Status: Backport [commit 98cf48f60a, included in 2.4.1]
22Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
23
24---
25 trace-events | 3 ---
26 vl.c | 27 ---------------------------
27 2 files changed, 0 insertions(+), 30 deletions(-)
28
29diff --git a/trace-events b/trace-events
30index 6790292..b813ae4 100644
31--- a/trace-events
32+++ b/trace-events
33@@ -603,9 +603,6 @@ scsi_request_sense(int target, int lun, int tag) "target %d lun %d tag %d"
34 vm_state_notify(int running, int reason) "running %d reason %d"
35 load_file(const char *name, const char *path) "name %s location %s"
36 runstate_set(int new_state) "new state %d"
37-g_malloc(size_t size, void *ptr) "size %zu ptr %p"
38-g_realloc(void *ptr, size_t size, void *newptr) "ptr %p size %zu newptr %p"
39-g_free(void *ptr) "ptr %p"
40 system_wakeup_request(int reason) "reason=%d"
41 qemu_system_shutdown_request(void) ""
42 qemu_system_powerdown_request(void) ""
43diff --git a/vl.c b/vl.c
44index f2bd8d2..ea9e0e6 100644
45--- a/vl.c
46+++ b/vl.c
47@@ -2703,26 +2703,6 @@ static const QEMUOption *lookup_opt(int argc, char **argv,
48 return popt;
49 }
50
51-static gpointer malloc_and_trace(gsize n_bytes)
52-{
53- void *ptr = malloc(n_bytes);
54- trace_g_malloc(n_bytes, ptr);
55- return ptr;
56-}
57-
58-static gpointer realloc_and_trace(gpointer mem, gsize n_bytes)
59-{
60- void *ptr = realloc(mem, n_bytes);
61- trace_g_realloc(mem, n_bytes, ptr);
62- return ptr;
63-}
64-
65-static void free_and_trace(gpointer mem)
66-{
67- trace_g_free(mem);
68- free(mem);
69-}
70-
71 static int machine_set_property(void *opaque,
72 const char *name, const char *value,
73 Error **errp)
74@@ -2950,11 +2930,6 @@ int main(int argc, char **argv, char **envp)
75 bool userconfig = true;
76 const char *log_mask = NULL;
77 const char *log_file = NULL;
78- GMemVTable mem_trace = {
79- .malloc = malloc_and_trace,
80- .realloc = realloc_and_trace,
81- .free = free_and_trace,
82- };
83 const char *trace_events = NULL;
84 const char *trace_file = NULL;
85 ram_addr_t maxram_size;
86@@ -2970,8 +2945,6 @@ int main(int argc, char **argv, char **envp)
87 error_set_progname(argv[0]);
88 qemu_init_exec_dir(argv[0]);
89
90- g_mem_set_vtable(&mem_trace);
91-
92 module_call_init(MODULE_INIT_QOM);
93
94 qemu_add_opts(&qemu_drive_opts);
95--
961.7.0.4
97
diff --git a/meta/recipes-devtools/qemu/qemu_2.4.0.1.bb b/meta/recipes-devtools/qemu/qemu_2.4.0.1.bb
index 23e565db82..c96da02079 100644
--- a/meta/recipes-devtools/qemu/qemu_2.4.0.1.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.4.0.1.bb
@@ -10,6 +10,7 @@ SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
10 file://smc91c111_fix2.patch \ 10 file://smc91c111_fix2.patch \
11 file://smc91c111_fix3.patch \ 11 file://smc91c111_fix3.patch \
12 file://no-valgrind.patch \ 12 file://no-valgrind.patch \
13 file://trace-remove-malloc-tracing.patch \
13 " 14 "
14SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2" 15SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
15SRC_URI[md5sum] = "c99445164e77184a9ba2e7dbf7ed5c29" 16SRC_URI[md5sum] = "c99445164e77184a9ba2e7dbf7ed5c29"