• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ TraceOutput类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ TracePoint类代码示例发布时间:2022-05-31
下一篇:
C++ TraceFunction类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap