首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到18条相似文献,搜索用时 62 毫秒
1.
路径剖析技术用于获取和分析程序中各条路径的执行次数.路径剖析采用在待剖析程序中插装探针的方式以跟踪执行,并使用对路径进行编码的方式以高效地获取剖析结果.选择性剖析是针对用户感兴趣的一部分路径,在非选择性剖析技术的基础上进行优化,以尽可能低的耗费来完成剖析.现有的选择性剖析技术采用的优化措施局限于减少探针数目和压缩路径编码空间,而且其允许的用户兴趣路径局限于无环路径.文中提出了一种新的选择性剖析方法 PSP(Profiling Selected Paths),可以精确的剖析带有循环的兴趣路径,并使用了在执行过程中对非兴趣路径进行检测和提前终止的技术来降低耗费.理论分析和实验评估表明PSP方法能够精确地剖析兴趣路径,并使用兴趣路径来提升剖析效率.  相似文献   

2.
动态分析是程序理解的重要方法,而插装技术是其中常用的关键技术之一.介绍了QESat/C 中动态分析子系统的插装策略,在其基础上提出并实现了新的插装器并改进了插装探针库的效率.实验表明,改进后的动态分析子系统具有插装速度快、动态结果文件小、动态信息合并效率高的优点.展望了现有系统如何支持新的动态分析技术,最后对全文进行了总结.  相似文献   

3.
路径测试法是软件测试的一种基本方法。将C程序按照控制结构进行分类,结合路径测试特点进行插装,在设置探针的同时提取函数静态信息,算法采用先获取局部路径,再进一步获取全局路径的方法。实验结果表明,基于插装的路径获取技术,具有较高的准确率和效率,尤其适用于基于函数的路径提取。  相似文献   

4.
5.
系统平台、编译器以及编译选项的差异,都可能会导致程序的源代码和编译得到的可执行代码之间存在语义差异,仅对源代码进行分析可能会遗漏隐藏在可执行代码里的漏洞。即使在源代码分析中验证了所需要的安全性质,也无法保证不违反可执行代码中的安全性质。本文基于一个二进制动态插装框架,设计并实现了一种对程序执行路径进行追踪的原型系统。实验证明,本系统在准确追踪执行路径的同时,能够过滤掉90%~99%的次要指令,极大提高了分析效率。最后,本文对其他的技术方案、现有原型系统的不足以及未来的工作进行了讨论。  相似文献   

6.
李志伟 《测控技术》2011,30(10):88-91
程序插装是软件测试中一种重要的白盒测试技术.介绍了程序插装的基本原理,分析了程序插装的关键要素,研究了插装测试设计的主要内容.针对常用的程序结构,如线性程序、结构化程序、面向对象程序的不同特点,提出了相应的程序插装策略和测试实现方法.在插装测试实践中,根据程序测试的规模、要求等,需要综合考虑程序插装对被测程序性能、执行...  相似文献   

7.
针对测试路径覆盖的可行性问题,给出了一种新的面向路径测试覆盖准则的测试数据自动生成工具。并对Length_N路径覆盖准则进行了定义,运用该准则对被测程序进行静态分析,得到完整路径表(CFG_PT),结合程序插装技术和遗传模拟退火算法自动生成测试数据。实验表明,该工具在实际应用中有较好的效果。  相似文献   

8.
程序优化是提高程序运行效率的重要步骤,程序剖析是程序优化的第一步。对于串行语言,程序剖析代码是由编译器通过一个命令行开关自动插入。但是,大部分并行语言编译器都不具有这个功能。该文以并行C++语言的可移植的动态剖析程序(profiler)为例,从两方面对问题进行了论述:首先给出实现可移植动态剖析程序的一般方法;然后分析一个用于pC++插桩(Instrumentation)工具。  相似文献   

9.
构件具有严格的封装性、二进制级代码复用的特点,这些特点使得构件测试较之传统软件更具难度。构件测试的主要困难是构件交互的障碍。探针模型较好地解决了构件测试的问题。本论文从软构件测试出发.建立visual C++环境的探针模型并实现了基于探针模型的COM构件测试技术。  相似文献   

10.
全覆盖路径规划在现实生活中具有很广泛的应用,本文针对已存在的全覆盖路径规划算法中的内螺旋算法进行改进,提出带有优先级的内螺旋算法PISC算法。在算法中加入行走优先级,并采用回溯法解决清扫机器人进入的死角问题,优化机器人的清扫路径,最后在Visual C+〖KG-*3〗+6.0编程环境下进行算法仿真。实验结果表明,清扫机器人能有效地避开障碍物,在自由区域顺利行走,提高了清扫机器人的清扫效率,减少了机器人清扫的重复路径。  相似文献   

11.
Path profiling records the frequency of each path in an executed program.To accomplish profiling,probes are instrumented in the program and executed as the program runs.So,the number of probes has a significant impact on the efficiency of a profiling technique.By profiling only the interesting paths,existing techniques try to improve the profiling efficiency by reducing the number of probes and optimize path encodings for efficient storage.However,they lack accuracy,waste time on running uninteresting paths,and can mainly deal with acyclic paths.In this article,a novel technique called Profiling Selected Paths(PSP)is introduced to profile selected paths,which enables custom selection for both acyclic and cyclic paths and increases the execution efficiency by early termination on uninteresting paths.Theoretical analysis and experimental evaluation indicate that PSP performs better than existing techniques.  相似文献   

12.
    
Testers use coverage data for test suite quality assessment, stopping criteria definition, and effort allocation. However, as the complexity of products and testing processes increases, the cost of coverage data collection may grow significantly, jeopardizing its potential application. To mitigate this problem this paper presents the concept of ‘disposable coverage instrumentation’—coverage instrumentation that is removed after its execution—through two techniques: local disposal, and collective disposal. A Java virtual machine was extended to support these techniques, and their potential is shown through two studies utilizing the Specjvm98 and Specjbb2000 benchmarks. The results indicate that the techniques can reduce coverage collection overhead by an order of magnitude over state‐of‐the‐art techniques. Copyright © 2006 John Wiley & Sons, Ltd.  相似文献   

13.
    
Calling context trees (CCTs) associate performance metrics with paths through a program's call graph, providing valuable information for program understanding and performance analysis. In real applications, however, CCTs might easily consist of tens of millions of nodes, making them difficult to analyze and also hurting execution times because of poor access locality. For performance analysis, accurately mining only hot calling contexts may be more useful than constructing an entire CCT with millions of uninteresting paths, because the distribution of context frequencies is typically very skewed. In this article, we show how to exploit this property to considerably reduce the CCT size, introducing a novel runtime data structure, called hot CCT (HCCT), in the spectrum of representations for interprocedural control flow. The HCCT includes only hot nodes and their ancestors in a CCT and can be constructed independently from it by using fast, space‐efficient algorithms for mining frequent items in data streams. With this approach, we can distinguish between hot and cold contexts on the fly while obtaining very accurate frequency counts. We show, both theoretically and experimentally, that the HCCT achieves a similar precision as the CCT in a space that is several orders of magnitude smaller and roughly proportional to the number of hot contexts. Our approach can be effectively combined with previous context‐sensitive profiling techniques, as we show for static bursting. We devise an implementation as a plug‐in for the gcc compiler that incurs a slowdown competitive with the gprof call‐graph profiler while collecting finer‐grained profiles. Copyright © 2015 John Wiley & Sons, Ltd.  相似文献   

14.
    
In this paper, the shortest path problem with forbidden paths is addressed. The problem under consideration is formulated as a particular instance of the resource-constrained shortest path problem. Different versions of a dynamic programming-based solution approach are defined and implemented. The proposed algorithms can be viewed as an extension of the node selection approach proposed by Desrochers in 1988. An extensive computational test is carried out on a meaningful number of random instances with the purpose of assessing the behaviour of the developed solution approaches. A comparison with the state-of-the-art method proposed to address the problem under study is also made. The computational results are very encouraging and highlight that the proposed algorithms are very efficient.  相似文献   

15.
基于路径覆盖插桩的可执行代码测试工具实现   总被引:1,自引:0,他引:1  
王轶  蒋同海  董军  周喜 《计算机工程》2012,38(5):35-37,40
为解决传统程序插桩技术存在代码膨胀和运行时间较长的问题,提出对可执行代码进行控制流路径覆盖消除冗余的插桩策略。依据该策略设计一种针对Java可执行代码的单元测试工具,完成程序执行路径跟踪和覆盖率分析。对测试工具进行功能验证和性能分析,结果表明,该策略能够有效减少插桩点数量,降低插桩对被测程序时间特性的影响。  相似文献   

16.
    
Virtual execution environments, such as the Java virtual machine, promote platform‐independent software development. However, when it comes to analyzing algorithm complexity and performance bottlenecks, available tools focus on platform‐specific metrics, such as the CPU time consumption on a particular system. Other drawbacks of many prevailing profiling tools are high overhead, significant measurement perturbation, as well as reduced portability of profiling tools, which are often implemented in platform‐dependent native code. This article presents a novel profiling approach, which is entirely based on program transformation techniques, in order to build a profiling data structure that provides calling‐context‐sensitive program execution statistics. We explore the use of platform‐independent profiling metrics in order to make the instrumentation entirely portable and to generate reproducible profiles. We implemented these ideas within a Java‐based profiling tool called JP. A significant novelty is that this tool achieves complete bytecode coverage by statically instrumenting the core runtime libraries and dynamically instrumenting the rest of the code. JP provides a small and flexible API to write customized profiling agents in pure Java, which are periodically activated to process the collected profiling information. Performance measurements point out that, despite the presence of dynamic instrumentation, JP causes significantly less overhead than a prevailing tool for the profiling of Java code. Copyright © 2008 John Wiley & Sons, Ltd.  相似文献   

17.
    
Bytecode instrumentation is a widely used technique to implement aspect weaving and dynamic analyses in virtual machines such as the Java virtual machine. Aspect weavers and other instrumentations are usually developed independently and combining them often requires significant engineering effort, if at all possible. In this article, we present polymorphic bytecode instrumentation(PBI), a simple but effective technique that allows dynamic dispatch amongst several, possibly independent instrumentations. PBI enables complete bytecode coverage, that is, any method with a bytecode representation can be instrumented. We illustrate further benefits of PBI with three case studies. First, we describe how PBI can be used to implement a comprehensive profiler of inter‐procedural and intra‐procedural control flow. Second, we provide an implementation of execution levels for AspectJ, which avoids infinite regression and unwanted interference between aspects. Third, we present a framework for adaptive dynamic analysis, where the analysis to be performed can be changed at runtime by the user. We assess the overhead introduced by PBI and provide thorough performance evaluations of PBI in all three case studies. We show that pure Java profilers like JP2 can, thanks to PBI, produce accurate execution profiles by covering all code, including the core Java libraries. We then demonstrate that PBI‐based execution levels are much faster than control flow pointcuts to avoid interference between aspects and that their efficient integration in a practical aspect language is possible. Finally, we report that PBI enables adaptive dynamic analysis tools that are more reactive to user inputs than existing tools that rely on dynamic aspect‐oriented programming with runtime weaving. These experiments position PBI as a widely applicable and practical approach for combining bytecode instrumentations. © 2015 The Authors. Software: Practice and Experience Published by John Wiley & Sons Ltd.  相似文献   

18.
K优路径的一种求解算法与实现   总被引:2,自引:1,他引:2  
求解最优路径的算法已经比较成熟,但国内外求解K优路径的算法还未见到。在作战指挥中,通常需要人们能够根据战场情况提供部队行动路线的多个方案供指挥员决策。针对这一军事需求,论文提出了一种求解K优路径的算法,给出了相应的数据结构和算法实现,同时从实现的角度对Dijkstra算法进行了改进。  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号