[gnome-continuous-yocto/gnomeostree-3.28-rocko: 2772/8267] bootchart2: Allocate space on heap for collector chunks
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 2772/8267] bootchart2: Allocate space on heap for collector chunks
- Date: Sat, 16 Dec 2017 23:41:57 +0000 (UTC)
commit fe0114869ec386ebbd7fd002df9532f39c8285f2
Author: Kyle Russell <bkylerussell gmail com>
Date: Sun Sep 25 07:43:32 2016 -0400
bootchart2: Allocate space on heap for collector chunks
Nicer for embedded devices which may have smaller stack limitations.
(From OE-Core rev: 7efbe5e696d3445d10e6d1554eb1285b84a59914)
Signed-off-by: Kyle Russell <bkylerussell gmail com>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
...llector-Allocate-space-on-heap-for-chunks.patch | 45 ++++++++++++++++++++
.../bootchart2/bootchart2_0.14.8.bb | 1 +
2 files changed, 46 insertions(+), 0 deletions(-)
---
diff --git
a/meta/recipes-devtools/bootchart2/bootchart2/0001-collector-Allocate-space-on-heap-for-chunks.patch
b/meta/recipes-devtools/bootchart2/bootchart2/0001-collector-Allocate-space-on-heap-for-chunks.patch
new file mode 100644
index 0000000..7a8813e
--- /dev/null
+++ b/meta/recipes-devtools/bootchart2/bootchart2/0001-collector-Allocate-space-on-heap-for-chunks.patch
@@ -0,0 +1,45 @@
+From 09505532b49573663fb4ff4dad424dc2ef4c1f84 Mon Sep 17 00:00:00 2001
+From: Kyle Russell <bkylerussell gmail com>
+Date: Wed, 13 Jul 2016 17:30:00 -0400
+Subject: [PATCH] collector: Allocate space on heap for chunks
+
+Nicer for embedded devices which may have smaller stack limitations.
+
+Upstream-Status: Submitted [https://github.com/xrmx/bootchart/pull/74]
+
+Signed-off-by: Kyle Russell <bkylerussell gmail com>
+---
+ collector/dump.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/collector/dump.c b/collector/dump.c
+index e673b5b..2f094b4 100644
+--- a/collector/dump.c
++++ b/collector/dump.c
+@@ -184,12 +184,12 @@ static void dump_buffers (DumpState *s)
+ log ("reading %d chunks (of %d) ...\n", max_chunk, s->map.max_chunk);
+ for (i = 0; i < max_chunk; i++) {
+ FILE *output;
+- char buffer[CHUNK_SIZE];
+- Chunk *c = (Chunk *)&buffer;
++ char *buffer = malloc(CHUNK_SIZE);
++ Chunk *c = (Chunk *)buffer;
+ size_t addr = (size_t) s->map.chunks[i];
+
+ lseek (s->mem, addr, SEEK_SET);
+- read (s->mem, &buffer, CHUNK_SIZE);
++ read (s->mem, buffer, CHUNK_SIZE);
+ /* log ("type: '%s' len %d\n",
+ c->dest_stream, (int)c->length); */
+
+@@ -197,6 +197,7 @@ static void dump_buffers (DumpState *s)
+ fwrite (c->data, 1, c->length, output);
+ bytes_dumped += c->length;
+ fclose (output);
++ free(buffer);
+ }
+ log ("wrote %ld kb\n", (long)(bytes_dumped+1023)/1024);
+ }
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
b/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
index fdebb64..4f01734 100644
--- a/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
+++ b/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
@@ -93,6 +93,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
SRC_URI = "git://github.com/mmeeks/bootchart.git \
file://bootchartd_stop.sh \
file://0001-Fixed-Missing-default-value-for-BOOTLOG_DEST.patch \
+ file://0001-collector-Allocate-space-on-heap-for-chunks.patch \
"
S = "${WORKDIR}/git"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]