地蛋是什么| 生蚝有什么功效与作用| 口腔扁平苔藓是什么原因造成的| 手刃是什么意思| 潋滟什么意思| 体罚是什么意思| 蟑螂屎长什么样| 指教是什么意思| 黄花胶是什么鱼的胶| 生长激素分泌的高峰期是什么时候| 花甲吃什么| 右眼跳什么意思| 名存实亡是什么意思| 绿豆的功效与作用是什么| 领养孩子需要什么条件| 如五行属什么| 肺部有空洞是什么病症| 九月三号是什么日子| 梦到被蜜蜂蛰是什么意思| 喜欢吃冰的是什么原因| 牛蒡是什么东西| 丙火是什么意思| 细菌是什么| 爱有什么用| 五月底是什么星座| 为什么海螺里有大海的声音| 患得患失是什么意思| guess是什么品牌| 孕妇为什么要左侧睡不能右侧睡| 翔是什么意思| apl医学上是什么意思| 抹茶是什么茶| 碱性磷酸酶偏高是什么原因| 脾肾两虚吃什么中成药最好| 吃什么对肺有好处| 石斛是什么东西| 莲花与荷花有什么区别| 心是什么结构| 存款准备金率下调意味着什么| 花花世界不必当真是什么歌| 晚上五点是什么时辰| 78年属马的是什么命| 大头虾是什么意思| 早晨4点是什么时辰| 梦字五行属什么| 出炉是什么意思| 憧憬未来是什么意思| 十月二十六是什么星座| 睡觉容易惊醒是什么原因| 标准工资指什么| 苍蝇为什么喜欢往人身上飞| 手术后吃什么好| 慈爱是什么意思| 梦到男孩子是什么意思| 什么是蓝颜知己| 重庆古代叫什么| 三丧日是什么意思| 紫癜是什么病| palladium是什么牌子| 11月26是什么星座| 11月是什么星座| 尿血吃什么药最好| 开飞机是什么意思| 四季春茶属于什么茶| 孕期血糖高有什么症状| 眼压高什么症状| 想吃甜食是身体缺什么| 老人家脚肿是什么原因引起的| 什么样的手相最有福气| 刘德华属什么生肖| 啤酒ipa是什么意思| mica是什么意思| 12月14日是什么星座| 朝拜的意思是什么| 做生意的人最忌讳什么| 什么果酒最好喝| 一度电是什么概念| 尿拉不出来是什么原因| 老年人补什么钙效果最好| bmp是什么意思| 30年婚姻是什么婚| 做牛排需要什么调料| 下体有异味是什么原因| 卯木代表什么| 2003年是什么命| 妇科病吃什么药| 心肌缺血用什么药| 15朵玫瑰花代表什么意思| 女性排卵期是什么时候| 皂基是什么| 信奥是什么| 痔疮什么感觉| 白细胞低是什么原因引起的| 疖肿是什么意思| 女生腋毛多是什么原因| be结局是什么意思| 什么啊| 体重用什么单位| 做什么生意好赚钱| 附子理中丸治什么病| 酸菜鱼加什么配菜好吃| 肤浅什么意思| pof是什么意思| 失聪是什么意思| 玫瑰花像什么| 肛裂涂什么药膏能愈合| 薄姬为什么讨厌窦漪房| 鸡同鸭讲是什么意思| 高血压喝什么茶好| alb是什么意思| 相是什么生肖| d二聚体高是什么意思| pms是什么意思| 智商135是什么水平| 子宫内膜厚是什么原因引起的| 速战速决的意思是什么| 血栓吃什么药最好| 缺锌有什么表现和症状| 什么车| 月经推迟挂什么科| 楚国什么时候灭亡的| 男孩学什么技术最好| 经常手麻是什么原因| 高血压用什么药| 缺钙吃什么| 不经意间是什么意思| 性冷淡吃什么药| 怀孕日期是从什么时候开始算| 趣味相投是什么意思| 心灵鸡汤是什么意思| 公鸡的尾巴像什么| 做梦掉牙齿是什么意思周公解梦| 墨迹是什么意思| 诗眼是什么意思| 64年属什么的| 书犹药也下一句是什么| 土豆什么时候收获| 吃什么可以快速排便| 阳虚吃什么好| 胃炎吃什么中药效果好| 下丘脑分泌什么激素| 空字五行属什么| 什么牌空调好用又省电| 什么老什么老| 出道是什么意思| 炖牛肉放什么| 丝丝入扣是什么意思| 软卧代软座什么意思| 腰痛是什么原因引起的| 宇宙之外还有什么| 突然勃不起来是什么原因| 黔驴技穷是什么意思| 照烧是什么意思| 榴莲壳有什么用处| 性功能下降是什么原因| 煞气是什么意思| 面红耳赤是什么意思| 宝宝手心热是什么原因| 三羊开泰是什么意思| 什么颜色有助于睡眠| 大便拉不出来什么原因| 钟鸣鼎食是什么意思| 嘴唇紫色是什么原因| 牙齿松动了有什么办法能固齿吗| 春雨绵绵是什么生肖| 胯骨疼挂什么科| 淄博有什么大学| 香港身份证有什么好处| 叉烧炒什么菜好吃| 空调为什么不制冷| 才能是什么意思| 女性去泰国要注意什么| 孩子发烧手脚冰凉是什么原因| 三高人群适合吃什么| 乙肝表面抗体是什么意思| 骨密度挂什么科| 85年属什么生肖| 脖子疼挂什么科| 老是嗝气是什么原因| 人为什么要呼吸| 天那水是什么| 闭门思过是什么意思| 江西有什么好玩的地方| 下嘴唇发麻什么病兆| 钠是什么东西| 拉肚子吃什么药比较好| 肛门镜检查能查出什么| 走马观花是什么意思| 什么是肠梗阻| 什么生辉| 为什么会得扁平疣| 手心热是什么原因| 什么体质容易长结石| 人经常放屁是什么原因| 农历6月21日是什么星座| 结肠是什么病| 梦见眉毛掉了什么预兆| 三甲医院是什么意思| 双重人格是什么意思| 爸爸的哥哥的老婆叫什么| 散光是什么意思| 四级士官是什么级别| 11月11号什么星座| 月经下不来吃什么药| 感性什么意思| 经常落枕是什么原因引起的| 些几是什么意思| 钙过量会有什么症状| 好奇害死猫什么意思| 一月十号是什么星座| 牙发黑是什么原因怎么办| 如何知道自己是什么星座| psd是什么意思| 眉毛尾部有痣代表什么| 伤口不愈合用什么药| 马路上的菱形标志是什么意思| 今天是什么生肖日| 刘庄为什么要灭了阴家| 吃什么解毒| 为什么会胃胀气| 鸦片鱼是什么鱼| 胺碘酮又叫什么名字| 觊觎是什么意思| 白痰多是什么原因| 吃什么降三高最快| 拉肚子可以喝什么| 音序是什么| 浇头是什么意思| 鸟儿为什么会飞| 什么的蚂蚁| 降钙素原偏高说明什么| 晏字五行属什么的| fa什么意思| 孕吐什么时候出现| 油条配什么好吃| 县教育局局长是什么级别| 高沫是什么茶| 三十八岁属什么生肖| 生殖科是检查什么的| 80岁属什么生肖| 前列腺穿刺是什么意思| 朝什么暮什么| bug是什么意思| 蜱虫咬了什么症状| 特别嗜睡是什么原因| 腹泻恶心想吐是什么原因| 多梦吃什么药| 女性排卵期一般是什么时候| 男生射精是什么感觉| 物心念什么| 荷兰机场叫什么| 履历是什么意思| 1996年是什么命| 总是低烧是什么原因造成的| 女人小便疼是什么原因| 痔疮是什么东西| 三跪九叩是什么意思| 起什么转什么成语| 电离辐射是指什么| 亚麻籽有什么功效| 什么狗最贵| 白带有血丝是什么原因| 汤姆猫是什么品种| 十二月十八号是什么星座| 百度

依旧闪电侠!韦德反击一条龙单手劈扣(篮网vs公牛)

百度 不过话说回来,韦德现在和尤尼恩的感情非常好,经常携手参加活动,在银幕前非常的恩爱。

The Windows software trace preprocessor (WPP; the preprocessor and related support tools are known as WPP Software Tracing) is a preprocessor that simplifies the use of WMI event tracing to implement efficient software tracing in drivers and applications that target Windows 2000 and later operating systems. WPP was created by Microsoft and is included in the Windows DDK. Although WPP is wide in its applicability, it is not included in the Windows SDK, and therefore is primarily used for drivers and driver support software produced by software vendors that purchase the Windows DDK.

Background

edit

Software tracing is a specialized use of logging to record information about a program's execution. This information is commonly used for debugging. In contrast to event logging, the primary purpose of which is to produce records of events that can be audited by system administrators (see for example Event Viewer) or analyzed by management tools, software tracing is primarily a debugging aid for software developers. As such, many of the non-functional requirements of event logging, such as localizability or a standards-based output format, are explicitly non-goals for most applications of software tracing. On the other hand, software tracing has special requirements for performance that are not generally as important in event logging. For example, one common use of software tracing, in/out tracing, produces output at the entry point and return of functions or methods so that a developer can visually follow the execution path, often including parameters and return values, in a debugger or text-based log file (this can be seen as a run-time analog of a sequence diagram). This type of tracing, although useful for developers, can greatly hurt performance of a software product if it cannot be disabled (either at compile-time via conditional compilation, or at run-time via flags).

Additional considerations special to software tracing include the following:

  • In proprietary software, tracing data may include sensitive information about the product's source code.
  • If tracing is enabled or disabled at run-time, many methods of tracing require a significant amount of additional data be included in the binary, which can indirectly hurt performance even when tracing is disabled.
  • If tracing is enabled or disabled at compile-time, getting trace data for an issue on a customer machine depends on the customer being willing and able to install a special, tracing enabled, version of your software.
  • Certain types of software, such as drivers, need to meet strict performance requirements even with tracing enabled.

Due to the first two considerations, traditional methods of software tracing use conditional compilation to enable or disable tracing (and inclusion of tracing data) at compile-time. For example, using the C preprocessor, one might define a macro DebugOut as follows:

#ifdef _DEBUG
#define DebugOut(msg, ...) \
    DebugPrintf(__FUNCTION__ "(" __FILE__ ":" TO_STRING(__LINE__) ")\t" \
        msg, __VAR_ARGS__)
#else
#define DebugOut(msg, ...)
#endif

where TO_STRING is a macro that converts the line number (__LINE__) to a string and DebugPrintf is a printf-like function that might for example output text to the debugger.

Then, the following code:

DebugOut("Error %d occurred\n", error_code);

would produce output similar to the following on debug builds only:

SomeFunction(file.c:78)    Error 217 occurred

Another technique for certain types of tracing (particularly in/out tracing) is to use instrumentation. While this technique can address many of the major concerns, it is not always available (typically only in managed code).

WMI event tracing is an example of a technology that addresses in particular performance of tracing in performance-critical code such as drivers. It can also address the concern of controlling the distribution of sensitive trace information by letting a developer define the human-readable tracing data ("Error %d occurred\n" in the example above) separately from the code so that it is not built into the product (in the code, a specific message is referred to by its message number). However, there are some important limitations:

  • WMI event tracing cannot, by itself, automatically generate the "SomeFunction(file.c:78)" part of the trace message. This is a limitation of all such technologies, not specific to WMI event tracing.
  • Requiring the human-readable part of the tracing data to be separated from the code can decrease the readability of the code.
  • Using this technique can introduce significant development overhead for "one-shot" tracing messages.

Operation of WPP

edit

WPP is run prior to compilation (in other words, before even the C preprocessor), and generates a trace message header for each file that it processes (by default this header is filename.tmh, where filename is the name of the processed source file). This header must then be explicitly included into the source file, for example:

// File: file.cxx
// This file is an example of using WPP
#include "file.tmh"

WPP's understanding of C/C++ syntax is very limited. In particular, it does not expand macros (except in special circumstances where it is necessary), nor does it handle pragmas or perform any semantic analysis.

A developer specifies one or more tracing macros that WPP should handle, via a configuration file, special annotations in comments, command line parameters, or some combination of these methods. Each time WPP encounters one of the macros that it is supposed to handle, it generates a trace message macro. In other words, if for example DoTrace is a tracing macro, WPP will generate a separate macro for each occurrence of DoTrace. The generated trace message macros are disambiguated by file name and line number, and, using various preprocessor tricks, WPP in turn defines the original tracing macro so that it will expand the appropriate trace message macro at each occurrence.

How trace message macros are generated by WPP depends on a template file (the format of the file is undocumented). The default template files included with WPP specify that the string of a trace message should be included in an annotation (using the __annotation feature of the Microsoft Compiler). These strings are not included in the compiled code, but are included in the debugger symbol file in a format that tools included with WPP can understand. The trace message macros also include the logic for enabling or disabling tracing via flags and the calls to WMI event tracing APIs.

Limitations

edit
  • Because WPP doesn't expand macros, it won't recognize an instantiation of a tracing macro that is included in the definition of another macro. For example, if DoTrace is a tracing macro, and a macro CheckForErrors is defined as:
#define CheckForErrors(error_code) \
    if (IsError(error_code)) \
    { \
        DoTrace("Error %d occurred\n", err); \
        HandleError(error_code); \
    }

then WPP will not generate the trace message macros for DoTrace where CheckForErrors occurs. WPP provides an ad hoc workaround for this issue, but there still exists a small class of macros that cannot be expressed even using the workaround.

  • The default template file generates code that will only work properly with the Microsoft compiler. Although this is not an inherent limitation of the preprocessor, the fact that the template file (which controls what code is generated in the trace message header) uses an undocumented format means that in practice WPP will only work properly with the Microsoft compiler.
  • Earlier versions of WPP caused compiling errors when more than one trace macro header was included into a source file (for example, if a source file with tracing included a header that had tracing in inline functions). This is fixed in the most recent version. Note that this is also a limitation of the template file, not the WPP tool itself.
  • Because trace message macros are disambiguated by file and line number, there can be only one tracing macro per line in the source code.

References

edit
edit
74年出生属什么生肖 喉咙痛有黄痰吃什么药 河南话信球是什么意思 势均力敌什么意思 塑料属于什么垃圾
消化不良吃什么 尿酸高可以吃什么 布谷鸟长什么样 什么的蜡烛 六月二十六是什么日子
梦见老公回来了是什么征兆 胃穿孔是什么症状 纽带是什么意思 微创人流和无痛人流有什么区别 软蛋是什么意思
白酒不能和什么一起吃 野字五行属什么 孕妇建档是什么意思 20岁长白头发是什么原因造成的 咖啡对心脏有什么影响
七夕节什么时候hcv8jop5ns6r.cn 脾大是什么原因造成的96micro.com 什么是酒糟鼻hcv8jop5ns3r.cn 忽视是什么意思hcv7jop5ns2r.cn 舌苔发青是什么原因hcv9jop8ns1r.cn
性功能障碍吃什么药hcv8jop6ns4r.cn 扁桃体割了对身体有什么影响hcv9jop3ns2r.cn 农历5月17日是什么星座shenchushe.com 耳朵痒是什么原因hcv7jop9ns2r.cn 黑上衣配什么颜色裤子男hcv7jop4ns6r.cn
花孔雀是什么意思hcv8jop7ns2r.cn 成人发烧吃什么药hcv9jop8ns2r.cn 末梢神经炎吃什么药hcv8jop2ns7r.cn 四川有什么好吃的bjcbxg.com 怀孕期间吃什么对胎儿发育好hcv8jop4ns0r.cn
卿卿什么意思hcv8jop8ns1r.cn 奕什么意思hcv8jop1ns6r.cn 任劳任怨是什么生肖hcv8jop1ns2r.cn 什么是磁共振检查hcv9jop6ns6r.cn 布鲁斯是什么hcv8jop5ns3r.cn
百度