diff options
author | Xuelian <xuelian.bai@samsung.com> | 2020-06-23 18:26:28 +0800 |
---|---|---|
committer | Xuelian Bai <xuelian.bai@samsung.com> | 2024-01-18 09:29:10 +0800 |
commit | 136c1263ac09139d4efe20cef6c37ffffd1a7225 (patch) | |
tree | 54429a866e4dcfd2b522a2cb663bbb740d15140e | |
parent | 46e08c9850740fad5bc147ed87d939d6500dec60 (diff) | |
download | mesa-136c1263ac09139d4efe20cef6c37ffffd1a7225.tar.gz mesa-136c1263ac09139d4efe20cef6c37ffffd1a7225.tar.bz2 mesa-136c1263ac09139d4efe20cef6c37ffffd1a7225.zip |
Add support for ttrace
1. Add ttrace link in spec file
2. Add header file for ttrace
Change-Id: Ibfbc44f14f5e4b4e34d954249b2b399335134c4b
Signed-Off-by: Xuelian Bai <xuelian.bai@samsung.com>
-rw-r--r-- | include/tizen/tizen_utils.h | 11 | ||||
-rw-r--r-- | packaging/mesa.spec | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/tizen/tizen_utils.h b/include/tizen/tizen_utils.h new file mode 100644 index 00000000000..d6a16c18376 --- /dev/null +++ b/include/tizen/tizen_utils.h @@ -0,0 +1,11 @@ +#include <ttrace.h> + +#define TRACE_BEGIN(name,...) traceBegin(TTRACE_TAG_GRAPHICS, name, ##__VA_ARGS__) +#define TRACE_END() traceEnd(TTRACE_TAG_GRAPHICS) +#define TRACE_ASYNC_BEGIN(key, name,...) traceAsyncBegin(TTRACE_TAG_GRAPHICS, key, name, ##__VA_ARGS__) +#define TRACE_ASYNC_END(key, name,...) traceAsyncEnd(TTRACE_TAG_GRAPHICS, key, name, ##__VA_ARGS__) +#define TRACE_COUNTER(value, name,...) traceCounter(TTRACE_TAG_GRAPHICS, value, name, ##__VA_ARGS__) +#define TRACE_MARK(name,...) traceMark(TTRACE_TAG_GRAPHICS, name, ##__VA_ARGS__) + + + diff --git a/packaging/mesa.spec b/packaging/mesa.spec index 023d2d117cf..a20f774938a 100644 --- a/packaging/mesa.spec +++ b/packaging/mesa.spec @@ -26,6 +26,7 @@ BuildRequires: pkgconfig(dlog) BuildRequires: meson BuildRequires: python3 BuildRequires: python3-mako +BuildRequires: pkgconfig(ttrace) %ifarch x86_64 %ix86 BuildRequires: pkgconfig(libdrm_intel) >= 2.4.24 %endif @@ -58,6 +59,8 @@ cp %{SOURCE1002} . %{?asan:/usr/bin/gcc-unforce-options} mkdir build meson --prefix %{_prefix} build/ \ + -Dc_link_args="-lttrace" \ + -Dcpp_link_args="-lttrace" \ -Dlibdir=%{_libdir} \ -Dgallium-va=false \ -Dgallium-vdpau=false \ |