Skip to content

Commit 4b3faa7

Browse files
Merge pull request #1462 from asurdej-comcast/tracing_ftrace
[wpe-2.38] Add ftrace based system tracing
2 parents b690a08 + fe50f1a commit 4b3faa7

4 files changed

Lines changed: 415 additions & 0 deletions

File tree

Source/WTF/wtf/PlatformWPE.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ list(APPEND WTF_PUBLIC_HEADERS
1313
linux/ProcessMemoryFootprint.h
1414
linux/CurrentProcessMemoryStatus.h
1515
linux/RealTimeThreads.h
16+
linux/SystemTracingFTrace.h
1617

1718
unix/UnixFileDescriptor.h
1819
)

Source/WTF/wtf/SystemTracing.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,21 @@ enum TracePointCode {
146146

147147
#ifdef __cplusplus
148148

149+
#if USE(LINUX_FTRACE)
150+
#include <wtf/linux/SystemTracingFTrace.h>
151+
#endif
152+
149153
namespace WTF {
150154

151155
inline void tracePoint(TracePointCode code, uint64_t data1 = 0, uint64_t data2 = 0, uint64_t data3 = 0, uint64_t data4 = 0)
152156
{
153157
#if HAVE(KDEBUG_H)
154158
kdebug_trace(ARIADNEDBG_CODE(WEBKIT_COMPONENT, code), data1, data2, data3, data4);
159+
#elif USE(LINUX_FTRACE)
160+
SystemTracingFTrace::instance().tracePoint(code, data1);
161+
UNUSED_PARAM(data2);
162+
UNUSED_PARAM(data3);
163+
UNUSED_PARAM(data4);
155164
#else
156165
UNUSED_PARAM(code);
157166
UNUSED_PARAM(data1);

0 commit comments

Comments
 (0)