From 8c02497ea07ed452d3b2ac5eda9dd31e92973326 Mon Sep 17 00:00:00 2001 From: Youngwan Kim Date: Wed, 11 Jul 2018 11:14:56 +0900 Subject: [PATCH] [COMMON] lib: libdss: change dss-reader to libdss It's to fix build error in environment not installed qemu-aarch64. Change-Id: I6156bb191bfbfd80f29b46c713b13379a9e9b050 Signed-off-by: Youngwan Kim --- Makefile | 2 +- lib/dss-reader-build.sh | 29 ----------------------------- lib/libdss-build.sh | 30 ++++++++++++++++++++++++++++++ lib/{dss-reader.c => libdss.c} | 23 ++++++++++++----------- 4 files changed, 43 insertions(+), 41 deletions(-) delete mode 100755 lib/dss-reader-build.sh create mode 100755 lib/libdss-build.sh rename lib/{dss-reader.c => libdss.c} (82%) diff --git a/Makefile b/Makefile index a8ef69a479b5..73759d9c8377 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ NAME = Petit Gorille # That's our default target when none is given on the command line PHONY := _all _all: - @lib/dss-reader-build.sh + @lib/libdss-build.sh # o Do not use make's built-in rules and variables # (this increases performance and avoids hard-to-debug behaviour); diff --git a/lib/dss-reader-build.sh b/lib/dss-reader-build.sh deleted file mode 100755 index a694f028e27a..000000000000 --- a/lib/dss-reader-build.sh +++ /dev/null @@ -1,29 +0,0 @@ -clang \ ---target=aarch64-linux-gnu \ --I/usr/aarch64-linux-gnu/include \ --Iinclude \ --mlittle-endian \ --Qunused-arguments \ --fno-strict-aliasing \ --fno-common \ --fshort-wchar \ --std=gnu89 \ --DDSS_ANALYZER \ --fno-PIE \ --mno-implicit-float \ --DCONFIG_BROKEN_GAS_INST=1 \ --fno-asynchronous-unwind-tables \ --fno-pic \ --Oz \ --Wframe-larger-than=4096 \ --fno-stack-protector \ --mno-global-merge \ --no-integrated-as \ --fno-omit-frame-pointer \ --fno-optimize-sibling-calls \ --g \ --static \ --fno-strict-overflow \ --fno-merge-all-constants \ --fno-stack-check \ --g lib/dss-reader.c -o dss-reader diff --git a/lib/libdss-build.sh b/lib/libdss-build.sh new file mode 100755 index 000000000000..d61c4ec63e13 --- /dev/null +++ b/lib/libdss-build.sh @@ -0,0 +1,30 @@ +clang \ + --target=aarch64-linux-gnu \ + -I/usr/aarch64-linux-gnu/include \ + -Iinclude \ + -mlittle-endian \ + -Qunused-arguments \ + -fno-strict-aliasing \ + -fno-common \ + -fshort-wchar \ + -std=gnu89 \ + -DDSS_ANALYZER \ + -fno-PIE \ + -mno-implicit-float \ + -DCONFIG_BROKEN_GAS_INST=1 \ + -fno-asynchronous-unwind-tables \ + -fno-pic \ + -Oz \ + -Wframe-larger-than=4096 \ + -fno-stack-protector \ + -mno-global-merge \ + -fno-omit-frame-pointer \ + -fno-optimize-sibling-calls \ + -c \ + -static \ + -fno-strict-overflow \ + -fno-merge-all-constants \ + -fno-stack-check \ + -g lib/libdss.c -o lib/libdss.o + +aarch64-linux-android-ar -rc libdss.a lib/libdss.o diff --git a/lib/dss-reader.c b/lib/libdss.c similarity index 82% rename from lib/dss-reader.c rename to lib/libdss.c index 9aa44339ece8..ef7a0a337282 100644 --- a/lib/dss-reader.c +++ b/lib/libdss.c @@ -74,28 +74,29 @@ int main(int argc, char *argv[]) } } #ifdef CONFIG_DEBUG_SNAPSHOT_BINDER - for (i = 0; i < DSS_API_MAX_NUM << 2; i++) - { - printf("log[%.9f] = { 'type' : 'binder', 'cpu' : %d, 'trace_type' : %d, 'transaction_id' : %d, 'from_pid' : %d,"\ - " 'from_tid' : %d, 'to_pid' : %d, 'to_tid' : %d, 'from_pid_comm' : '%s', 'from_tid_comm' : '%s',"\ - " 'to_pid_comm' : '%s', 'to_tid_comm' : '%s', 'to_node_id' : %d, 'reply' : %d, 'flags' : 0x%x, 'code' : 0x%x,"\ + for (i = 0; i < DSS_API_MAX_NUM << 2; i++) { + printf("log[%.9f] = { 'type' : 'binder', 'cpu' : %d, 'trace_type' : %d, 'transaction_id' : %d," + " 'from_pid' : %d, 'from_tid' : %d, 'to_pid' : %d, 'to_tid' : %d," + " 'from_pid_comm' : '%s', 'from_tid_comm' : '%s'," + " 'to_pid_comm' : '%s', 'to_tid_comm' : '%s', 'to_node_id' : %d," + " 'reply' : %d, 'flags' : 0x%x, 'code' : 0x%x," " 'return_error' : %d, 'return_error_param' : %d, 'return_error_line' : %d}\n", p->binder[i].time/1.0e9, - p->binder[i].cpu, - p->binder[i].base.trace_type, p->binder[i].base.transaction_id, - p->binder[i].base.from_pid, p->binder[i].base.from_tid, p->binder[i].base.to_pid, p->binder[i].base.to_tid, + p->binder[i].cpu, p->binder[i].base.trace_type, p->binder[i].base.transaction_id, + p->binder[i].base.from_pid, p->binder[i].base.from_tid, + p->binder[i].base.to_pid, p->binder[i].base.to_tid, p->binder[i].base.from_pid_comm, p->binder[i].base.from_tid_comm, p->binder[i].base.to_pid_comm, p->binder[i].base.to_tid_comm, p->binder[i].transaction.to_node_id, p->binder[i].transaction.reply, p->binder[i].transaction.flags, p->binder[i].transaction.code, - p->binder[i].error.return_error, p->binder[i].error.return_error_param, p->binder[i].error.return_error_line); + p->binder[i].error.return_error, p->binder[i].error.return_error_param, + p->binder[i].error.return_error_line); if (p->binder[i].time == 0) break; } #endif #ifdef CONFIG_DEBUG_SNAPSHOT_ACPM - for (i = 0; i < DSS_LOG_MAX_NUM; i++) - { + for (i = 0; i < DSS_LOG_MAX_NUM; i++) { printf("log[%.9f] = { 'type' : 'acpmlog', 'log' : '%s', 'value' : %d }\n", p->acpm[i].acpm_time/1.0e9, p->acpm[i].log, -- 2.20.1