summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGihun Chang <gihun.chang@samsung.com>2016-12-23 11:37:31 +0900
committerGihun Chang <gihun.chang@samsung.com>2016-12-23 11:37:31 +0900
commit1f22dae15fb7dec7e64b5a695a5ba80926079dd2 (patch)
tree7733cbd0d69b510d89ee952bd3d19872e29eb941
parent5725e0112e457b87040040554e8eacda2f541d40 (diff)
parent762db4f43830730c2f75c46b684cc4c78f937e70 (diff)
downloadttrace-1f22dae15fb7dec7e64b5a695a5ba80926079dd2.tar.gz
ttrace-1f22dae15fb7dec7e64b5a695a5ba80926079dd2.tar.bz2
ttrace-1f22dae15fb7dec7e64b5a695a5ba80926079dd2.zip
Merge branch 'tizen_3.0' into 'tizen'
-rwxr-xr-xpackaging/ttrace.spec4
-rw-r--r--src/TTraceWrapper.cpp7
-rwxr-xr-xsrc/atrace/atrace.cpp5
-rwxr-xr-xsrc/ttrace.c1
4 files changed, 10 insertions, 7 deletions
diff --git a/packaging/ttrace.spec b/packaging/ttrace.spec
index 89dad62..0e805be 100755
--- a/packaging/ttrace.spec
+++ b/packaging/ttrace.spec
@@ -1,6 +1,6 @@
Name: ttrace
Summary: T-trace for tizen
-Version: 1.0.2
+Version: 1.0.3
Release: 1
Group: System/Libraries
License: Apache-2.0
@@ -51,7 +51,7 @@ T-trace library devel
%build
export CFLAGS="$CFLAGS -g -Wall -std=gnu99"
-export CXXFLAGS="$CXXFLAGS -std=c++0x -fPIE -pie"
+export CXXFLAGS="$CXXFLAGS -std=c++0x -fPIE -pie -fno-exceptions"
%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir} \
-DTTRACE_PROFILE=%{TTRACE_PROFILE} -DTTRACE_TIZEN_VERSION_MAJOR=%{TTRACE_TIZEN_VERSION_MAJOR}
make %{?jobs:-j%jobs}
diff --git a/src/TTraceWrapper.cpp b/src/TTraceWrapper.cpp
index c926095..9528fd4 100644
--- a/src/TTraceWrapper.cpp
+++ b/src/TTraceWrapper.cpp
@@ -23,11 +23,12 @@ TTraceWrapper::TTraceWrapper(uint64_t tags, const char* label, ...) {
char fmtd_label[MAX_LEN];
tag = tags;
+
va_start(ap, label);
- vsnprintf(fmtd_label, MAX_LEN, label, ap);
-
- traceBegin(tag, fmtd_label);
+ vsnprintf(fmtd_label, MAX_LEN-8, label, ap);
+ traceBegin(tag, "%s", fmtd_label);
va_end(ap);
+
}
TTraceWrapper::~TTraceWrapper() {
diff --git a/src/atrace/atrace.cpp b/src/atrace/atrace.cpp
index 3fabf0b..3fc0952 100755
--- a/src/atrace/atrace.cpp
+++ b/src/atrace/atrace.cpp
@@ -930,8 +930,9 @@ static void showHelp(const char *cmd)
" --async_start start circular trace and return immediatly\n"
" --async_dump dump the current contents of circular trace buffer\n"
" --async_stop stop tracing and dump the current contents of circular\n"
- " trace buffer\n"
- " --append append traces to the existing traces. do not clear the trace buffer\n and kernel trace events set"
+ " trace buffer\n"
+ " --append append traces to the existing traces. do not clear the trace buffer \n"
+ " and kernel trace events set\n"
" --backup back up the existing traces to /tmp/trace.backup and then clear the trace buffer\n"
" --list_categories\n"
" list the available tracing categories\n"
diff --git a/src/ttrace.c b/src/ttrace.c
index a467583..89e8509 100755
--- a/src/ttrace.c
+++ b/src/ttrace.c
@@ -208,6 +208,7 @@ void traceAsyncBegin(uint64_t tag, int32_t cookie, const char *name, ...)
va_list ap;
TTRACE_LOG("traceAsyncBegin:: write >> tag: %u tag_bit: %u cookie: %d", tag, *cur_enabled_tag, cookie);
+
va_start(ap, name);
snprintf(buf, MAX_LEN, "S|%5d|", getpid());
len += vsnprintf(buf + MAX_HEAD_LEN, POS_LABEL_ST, name, ap);