本文整理汇总了C++中TraceOutput类的典型用法代码示例。如果您正苦于以下问题:C++ TraceOutput类的具体用法?C++ TraceOutput怎么用?C++ TraceOutput使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TraceOutput类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: AddDump
virtual void AddDump(TraceOutput& out)
{
if (fResult >= 0) {
out.Print("poll done: count: %d: ", fResult);
PollTraceEntry::AddDump(out);
} else
out.Print("poll done: error: %#x", fResult);
}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:8,代码来源:wait_for_objects.cpp
示例2: AddDump
virtual void AddDump(TraceOutput& out)
{
out.Print("syscall pre: %s(", get_syscall_name(fSyscall));
if (fParameters != NULL) {
int32 stringIndex = 0;
const extended_syscall_info& syscallInfo
= kExtendedSyscallInfos[fSyscall];
for (int i = 0; i < syscallInfo.parameter_count; i++) {
const syscall_parameter_info& paramInfo
= syscallInfo.parameters[i];
const uint8* data = (uint8*)fParameters + paramInfo.offset;
uint64 value = 0;
bool printValue = true;
switch (paramInfo.type) {
case B_INT8_TYPE:
value = *(uint8*)data;
break;
case B_INT16_TYPE:
value = *(uint16*)data;
break;
case B_INT32_TYPE:
value = *(uint32*)data;
break;
case B_INT64_TYPE:
value = *(uint64*)data;
break;
case B_POINTER_TYPE:
value = (uint64)*(void**)data;
break;
case B_STRING_TYPE:
if (stringIndex < MAX_PARAM_STRINGS
&& fSyscall != SYSCALL_KTRACE_OUTPUT) {
out.Print("%s\"%s\"",
(i == 0 ? "" : ", "),
fParameterStrings[stringIndex++]);
printValue = false;
} else
value = (uint64)*(void**)data;
break;
}
if (printValue)
out.Print("%s%#" B_PRIx64, (i == 0 ? "" : ", "), value);
}
}
out.Print(")");
}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:49,代码来源:syscalls.cpp
示例3: AddDump
virtual void AddDump(TraceOutput& out)
{
out.Print("signal action: thread: %ld, signal: %lu (%s), "
"action: {handler: %p, flags: 0x%x, mask: 0x%lx}",
fThread, fSignal,
(fSignal < NSIG ? sigstr[fSignal] : "invalid"),
fAction.sa_handler, fAction.sa_flags, fAction.sa_mask);
}
开发者ID:mmanley,项目名称:Antares,代码行数:8,代码来源:signal.cpp
示例4:
void
TraceEntry::Dump(TraceOutput& out)
{
#if ENABLE_TRACING
// to be overridden by subclasses
out.Print("ENTRY %p", this);
#endif
}
开发者ID:sahil9912,项目名称:haiku,代码行数:8,代码来源:tracing.cpp
示例5: AddDump
virtual void AddDump(TraceOutput& out)
{
out.Print("guarded heap allocate: heap: %p; page: %p; "
"flags:%s%s%s%s", fHeap, fPageBase,
(fFlags & GUARDED_HEAP_PAGE_FLAG_USED) != 0 ? " used" : "",
(fFlags & GUARDED_HEAP_PAGE_FLAG_FIRST) != 0 ? " first" : "",
(fFlags & GUARDED_HEAP_PAGE_FLAG_GUARD) != 0 ? " guard" : "",
(fFlags & GUARDED_HEAP_PAGE_FLAG_DEAD) != 0 ? " dead" : "");
}
开发者ID:mmadia,项目名称:Haiku-services-branch,代码行数:9,代码来源:guarded_heap.cpp
示例6: _PrintSet
void _PrintSet(TraceOutput& out, const char* name, fd_set* set)
{
out.Print("%s: <", name);
if (set != NULL) {
bool first = true;
for (int i = 0; i < fCount; i++) {
if (!FD_ISSET(i, set))
continue;
if (first) {
out.Print("%d", i);
first = false;
} else
out.Print(", %d", i);
}
}
out.Print(">");
}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:21,代码来源:wait_for_objects.cpp
示例7:
void
AbstractTraceEntry::Dump(TraceOutput& out)
{
bigtime_t time = (out.Flags() & TRACE_OUTPUT_DIFF_TIME)
? fTime - out.LastEntryTime()
: fTime;
if (out.Flags() & TRACE_OUTPUT_TEAM_ID)
out.Print("[%6ld:%6ld] %10Ld: ", fThread, fTeam, time);
else
out.Print("[%6ld] %10Ld: ", fThread, time);
AddDump(out);
out.SetLastEntryTime(fTime);
}
开发者ID:mmanley,项目名称:Antares,代码行数:16,代码来源:tracing.cpp
示例8: AddDump
virtual void AddDump(TraceOutput& out)
{
out.Print("port %ld deleted", fID);
}
开发者ID:mariuz,项目名称:haiku,代码行数:4,代码来源:port.cpp
示例9: AddDump
virtual void AddDump(TraceOutput& out)
{
out.Print("user: %s", fMessage);
}
开发者ID:sahil9912,项目名称:haiku,代码行数:4,代码来源:tracing.cpp
示例10: DumpStackTrace
virtual void DumpStackTrace(TraceOutput& out)
{
out.PrintStackTrace(fStackTrace);
}
开发者ID:sahil9912,项目名称:haiku,代码行数:4,代码来源:tracing.cpp
示例11: AddDump
virtual void AddDump(TraceOutput& out)
{
out.Print("syscall restart");
}
开发者ID:RAZVOR,项目名称:haiku,代码行数:4,代码来源:thread.cpp
注:本文中的TraceOutput类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论