简体   繁体   English

VEINS/OMNeT++ 中的代码覆盖率计算和分析

[英]code coverage calculation and profiling in VEINS/OMNeT++

I'm trying to get code coverage and profiling information from my VEINS implementation using gcov / llvm-cov and gprof .我正在尝试使用gcov / llvm-covgprof从我的 VEINS 实现中获取代码覆盖率和分析信息。 What I have figured until now is I will have to change the Makefile to add the --coverage -O0 and -pg for gcov and gprof , respectively.到目前为止,我认为我必须更改 Makefile 以分别为gcovgprof添加--coverage -O0-pg However, the build process for VEINS is a little complex for me to add this viz.但是,VEINS 的构建过程对我来说添加这个可视化有点复杂。 ./configure that calls opp_makemake and then run make . ./configure调用opp_makemake然后运行make I would appreciate some help on this.我将不胜感激。

The OMNeT++ opp_makemake build system which Veins uses combines a variety of files into src/Makefile. Veins 使用的 OMNeT++ opp_makemake 构建系统将各种文件合并到 src/Makefile 中。 If you want to adapt how the final Makefile looks, the easiest way I can think of is to modify src/makefrag, a fragment that gets included verbatim in the finished Makefile.如果你想调整最终 Makefile 的外观,我能想到的最简单的方法是修改 src/makefrag,一个在完成的 Makefile 中逐字包含的片段。 An example is already included with Veins 5.0: https://github.com/sommer/veins/blob/veins-5.0/src/makefrag Veins 5.0 中已包含一个示例: https : //github.com/sommer/veins/blob/veins-5.0/src/makefrag

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM