Skip to content

Commit 2dad30b

Browse files
authored
Merge pull request #1555 from filipe-norte-red/wpe-2.46-ftrace-support
[wpe-2.46] Add ftrace based system tracing
2 parents f57d880 + 48eac0e commit 2dad30b

4 files changed

Lines changed: 504 additions & 0 deletions

File tree

Source/WTF/wtf/PlatformWPE.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ list(APPEND WTF_PUBLIC_HEADERS
5050
linux/CurrentProcessMemoryStatus.h
5151
linux/ProcessMemoryFootprint.h
5252
linux/RealTimeThreads.h
53+
linux/SystemTracingFTrace.h
5354

5455
unix/UnixFileDescriptor.h
5556
)

Source/WTF/wtf/SystemTracing.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ enum TracePointCode {
193193
#include <wtf/glib/SysprofAnnotator.h>
194194
#endif
195195

196+
#if USE(LINUX_FTRACE)
197+
#include <wtf/linux/SystemTracingFTrace.h>
198+
#endif
199+
196200
namespace WTF {
197201

198202
inline void tracePoint(TracePointCode code, uint64_t data1 = 0, uint64_t data2 = 0, uint64_t data3 = 0, uint64_t data4 = 0)
@@ -206,6 +210,11 @@ inline void tracePoint(TracePointCode code, uint64_t data1 = 0, uint64_t data2 =
206210
UNUSED_PARAM(data2);
207211
UNUSED_PARAM(data3);
208212
UNUSED_PARAM(data4);
213+
#elif USE(LINUX_FTRACE)
214+
SystemTracingFTrace::instance().tracePoint(code, data1);
215+
UNUSED_PARAM(data2);
216+
UNUSED_PARAM(data3);
217+
UNUSED_PARAM(data4);
209218
#else
210219
UNUSED_PARAM(code);
211220
UNUSED_PARAM(data1);

0 commit comments

Comments
 (0)