From 947d0141a6ab79d92a5f9973191c62be7a224ac2 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Tue, 3 Sep 2019 15:30:30 +0300 Subject: [PATCH] uftrace: use $PREFIX/tmp instead of /dev/shm --- packages/uftrace/build.sh | 2 +- packages/uftrace/cmds-record.c.patch | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/uftrace/build.sh b/packages/uftrace/build.sh index 412243645..a5385ead4 100644 --- a/packages/uftrace/build.sh +++ b/packages/uftrace/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://uftrace.github.io/slide TERMUX_PKG_DESCRIPTION="Function (graph) tracer for user-space" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_VERSION=0.9.3 -TERMUX_PKG_REVISION=3 +TERMUX_PKG_REVISION=4 TERMUX_PKG_SRCURL=https://github.com/namhyung/uftrace/archive/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=d801d72e3cdd83c510aeecc5160482d879498cf08fffd21e64f84151001e18ea TERMUX_PKG_DEPENDS="capstone, libandroid-glob, libandroid-spawn, libelf, ncurses, python2" diff --git a/packages/uftrace/cmds-record.c.patch b/packages/uftrace/cmds-record.c.patch index 6633a1802..29ff2f973 100644 --- a/packages/uftrace/cmds-record.c.patch +++ b/packages/uftrace/cmds-record.c.patch @@ -1,4 +1,6 @@ -+++ ./cmds/record.c 2019-08-26 14:37:07.385308338 +0300 +diff -uNr uftrace-0.9.3/cmds/record.c uftrace-0.9.3.mod/cmds/record.c +--- uftrace-0.9.3/cmds/record.c 2019-07-13 17:25:47.000000000 +0300 ++++ uftrace-0.9.3.mod/cmds/record.c 2019-09-03 15:29:17.756680758 +0300 @@ -60,6 +60,65 @@ static bool has_sched_event; static bool finish_received; @@ -65,3 +67,12 @@ static bool can_use_fast_libmcount(struct opts *opts) { if (debug) +@@ -918,7 +977,7 @@ + sscanf(sl->id, "/uftrace-%[^-]-%*d-%*d", shmem_session); + pr_dbg2("unlink for session: %s\n", shmem_session); + +- num = scandir("/dev/shm/", &shmem_bufs, filter_shmem, alphasort); ++ num = scandir("@TERMUX_PREFIX@/tmp/", &shmem_bufs, filter_shmem, alphasort); + for (i = 0; i < num; i++) { + sid[0] = '/'; + memcpy(&sid[1], shmem_bufs[i]->d_name, MSG_ID_SIZE);