本文整理汇总了C++中TraceOutput::Print方法的典型用法代码示例。如果您正苦于以下问题:C++ TraceOutput::Print方法的具体用法?C++ TraceOutput::Print怎么用?C++ TraceOutput::Print使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TraceOutput
的用法示例。
在下文中一共展示了TraceOutput::Print方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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(")");
}
示例3:
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);
}
示例4:
void
TraceEntry::Dump(TraceOutput& out)
{
#if ENABLE_TRACING
// to be overridden by subclasses
out.Print("ENTRY %p", this);
#endif
}
示例5: 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);
}
示例6: 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" : "");
}
示例7: _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(">");
}
示例8: AddDump
virtual void AddDump(TraceOutput& out)
{
out.Print("port %ld created, name \"%s\", owner %ld, capacity %ld",
fID, fName, fOwner, fCapacity);
}
示例9: AddDump
virtual void AddDump(TraceOutput& out)
{
out.Print("ktrace start");
}