首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 218 毫秒
1.
张杨  张冬雯  仇晶 《计算机科学》2015,42(11):84-89, 117
Java语言提供了同步锁、可重入锁和读写锁等几种锁机制,在并行程序设计中不同的数据结构使用这几种锁机制时获得的性能通常是不同的。为了在不同的锁机制之间进行自动转换,进而帮助程序员了解程序的性能,提出了一种面向Java锁机制的字节码自动重构框架,并基于该框架实现了字节码重构工具Lock2Lock。Lock2Lock在Quad中间表示的基础上对字节码进行静态分析,并对分析的结果进行一致性验证,通过Javassist完成字节码的重构。使用红黑树、消费者生产者程序以及SPECjbb2005 3个测试程序对Lock2Lock重构工具进行了测试,结果表明,Lock2Lock可以成功地实现从同步锁到可重入锁或读写锁的重构。  相似文献   

2.
JavaScript作为Web应用的主要编程语言之一,其解释执行、动态类型、面向原型等特性成为限制Web应用性能的主要因素。为了加快JavaScript运行速度,提升Web应用性能,本文提出一种采用预先编译的V8引擎优化方法。该方法将Web应用第一次解释执行过程中热点函数的字节码或机器码进行保存,Web应用下次运行时可以直接运行热点函数已保存的字节码或机器码,避免了热点函数的解释代价和编译代价,而且提出了新的代价模型来确定保存热点函数字节码或机器码带来的时间增益和空间代价。本文在V8引擎最新编译架构上实现了基于字节码的预先编译方法,并使用标准JavaScript引擎测试集进行了性能测试,实验结果表明在Kraken、Octane测试集上分别可以取得11%和13.6%的性能提升。  相似文献   

3.
为提高程序的整体执行效率,提出一种基于踪迹(trace-based)的通用即时编译技术。在SECD抽象机指令序列的解释执行中,将执行频率高的程序片段识别为踪迹,并编译成Java字节码,由Java虚拟机执行。任何用SECD抽象机实现的编程语言都可以使用该技术来提高程序执行效率。介绍该技术的实现方法,包括解释执行环境和Java字节码程序执行环境的转换方法,实现采用该技术的执行引擎框架。实验结果表明,该技术可有效提高程序的执行效率。  相似文献   

4.
基于RIA架构的网络监控系统的研究和实现   总被引:1,自引:0,他引:1  
针对传统Web架构下构建实时性和交互性要求较高的网络监控系统时存在的不足,给出了RIA架构的技术优势.讨论基于Flex的Cairngorm框架和消息“发布/订阅”机制实现网络监控系统.通过介绍拓扑图绘制工具和实时监控图表的实现过程,说明了RIA架构构建的监控系统具有交互性好、服务端性能高、网络负载低、易于部署的优点.  相似文献   

5.
基于黑盒测试思想的Fuzzing是漏洞分析的主要方法,但效率较低且不能分析未知格式.基于污点分析,提出一种针对文件型软件的漏洞发现新方法.利用污点分析寻找输入中能导致执行流到达脆弱点的字节,再改变这些字节产生新输入;同时根据污点信息产生特征码.利用插桩工具实现了原型系统,对三个真实漏洞进行了测试.实验结果表明该方法能有效发现漏洞,生成的测试用例远小于Fuzzing,且不依赖输入格式;特征码的误报率漏报率均较低.  相似文献   

6.
在提出了一种支持多种测试数据构造方式,具有异常监测及自动化分析模块的目标码动态测试框架。并按照该框架实现了对文件格式处理软件的安全性进行测试的原型系统DT,该系统实现了执行参数输入和缺陷注入两种测试方法。为了验证系统的有效性,以MS Office软件近两年来的公开漏洞为例对DT系统进行了测试,实验结果表明这些漏洞都可以通过测试发现。  相似文献   

7.
针对手工测试成本高、时效性弱和传统的接口自动化测试工具扩展能力不足问题,提出了一个支持用例集并行测试的接口测试平台(OLa). OLa采用分层架构模式将系统分为用户展示层、应用逻辑层、数据服务层和用例执行层.其中,用户展示层基于Vue框架开发,结合Vue Router、Vuex等工具实现单页应用;应用逻辑层基于Spring Boot框架开发;数据服务层基于MyBatis-Plus框架和Spring Data框架开发;用例执行层使用okhttp3、fastjson、jackson等工具实现接口测试.此外,基于系统技术架构、Java网络编程和面向抽象编程的思想,创新性地提出了基于C/S模式的用例执行流程和基于参数识别的自动匹配校验方法,解决了传统的自动化测试工具无法支持并行测试的问题.实验结果表明本文设计与实现的OLa接口测试平台支持单用例测试、用例集的串行测试和并行测试,能够自动识别用例参数并对接口响应内容进行校验,提高了接口测试的灵活性和有效性,降低了测试难度,并能够在用例之间无相互依赖的情况下提高接口测试的效率.  相似文献   

8.
张亚 《计算机工程》2019,45(6):273-279
为解决舰船一体化网络系统的测试充分性问题,设计网络化故障注入平台。基于网络故障注入和网络攻击2个层面,构建故障影响因子,形成故障模型库。利用tc、netem和netfilter功能模块和工具进行网络故障注入,基于tfn2k架构模拟网络攻击,根据用户配置的故障注入参数向Agent发送负载攻击指令的数据包,并接收处理Agent定时采集的本机性能检测数据。实例验证结果表明,该平台能够有效扩展故障模型库,实现测试数据的自动生成和注入监测,提高测试充分性和测试效率。  相似文献   

9.
李茜  肖萍 《计算机应用》2012,32(6):1727-1729
为了改进Dalvik虚拟机的性能,提出了一种基于多线程调度机制的Java虚拟机混合并发模式。该模式利用多线程并发调度和热方法表,通过将Java字节码的编译与执行过程相重叠来提高程序的执行效率,进而提升Dalvik虚拟机的处理速度;并对该模式设计与实现的关键技术进行了分析。实验结果表明,混合并发模式能够有效地提高Dalvik虚拟机中Java程序的执行速度。  相似文献   

10.
方面单元测试框架的设计与实现   总被引:1,自引:0,他引:1       下载免费PDF全文
缺乏成熟的方面测试和方面冲突检测技术是阻碍面向方面软件编程大规模应用的瓶颈性问题。针对方面单元测试,提出了无需与基模块编织的方面单元的独立测试框架AJUnit。该框架运用Java注释和源码与字节码映射等技术实现编译细节的透明化。基于控制流和数据流分析,AJUnit综合运用随机测试数据生成、相对测试充分性准则的优化和指定路径的测试数据生成等技术实现测试过程的自动化。文中也介绍了以AJUnit为基础的方面单元测试工具的设计和实现。  相似文献   

11.
Performance evaluation of embedded software is essential in an early development phase so as to ensure that the software will run on the embedded device's limited computing resources. The prevailing approaches either require the deployment of the software on the embedded target, which can be tedious and may be impossible in an early development phase, or rely on simulation, which can be very slow. In this article, we introduce a customizable cross‐profiling framework for embedded Java processors, including processors featuring a method cache. The developer profiles the embedded software in the host environment, completely decoupled from the target system, on any standard Java virtual machine, but the generated profiles represent the execution time metric of the target system. Our cross‐profiling framework is based on bytecode instrumentation. We identify several pointcuts in the execution of bytecode that need to be instrumented in order to estimate the CPU cycle consumption on the target system. An evaluation using the JOP embedded Java processor as target confirms that our approach reconciles high profile accuracy with moderate overhead. Our cross‐profiling framework also enables the performance evaluation of new processor architectures before they are implemented. As a case study, we explore the performance impact of various processor design choices and optimizations, such as different cache sizes or pipeline organizations, and come up with an improved processor design that yields speedups of up to 40% on standard Java benchmarks. Copyright © 2009 John Wiley & Sons, Ltd.  相似文献   

12.
Several module and class testing techniques have been applied to object‐oriented (OO) programs, but researchers have only recently begun developing test criteria that evaluate the use of key OO features such as inheritance, polymorphism, and encapsulation. Mutation testing is a powerful testing technique for generating software tests and evaluating the quality of software. However, the cost of mutation testing has traditionally been so high that it cannot be applied without full automated tool support. This paper presents a method to reduce the execution cost of mutation testing for OO programs by using two key technologies, mutant schemata generation (MSG) and bytecode translation. This method adapts the existing MSG method for mutants that change the program behaviour and uses bytecode translation for mutants that change the program structure. A key advantage is in performance: only two compilations are required and both the compilation and execution time for each is greatly reduced. A mutation tool based on the MSG/bytecode translation method has been built and used to measure the speedup over the separate compilation approach. Experimental results show that the MSG/bytecode translation method is about five times faster than separate compilation. Copyright © 2004 John Wiley & Sons, Ltd.  相似文献   

13.
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.  相似文献   

14.
The accurate measurement of the execution time of Java bytecode is one factor that is important in order to estimate the total execution time of a Java application running on a Java Virtual Machine. In this paper we document the difficulties and solutions for the accurate timing of Java bytecode. We also identify trends across the execution times recorded for all imperative Java bytecodes. These trends would suggest that knowing the execution times of a small subset of the Java bytecode instructions would be sufficient to model the execution times of the remainder. We first review a statistical approach for achieving high precision timing results for Java bytecode using low precision timers and then present a more suitable technique using homogeneous bytecode sequences for recording such information. We finally compare instruction execution times acquired using this platform independent technique against execution times recorded using the read time stamp counter assembly instruction. In particular our results show the existence of a strong linear correlation between both techniques.  相似文献   

15.
基于混合模式的Java卡字节码优化器   总被引:1,自引:0,他引:1       下载免费PDF全文
Java卡是一种基于Java语言的智能卡。因为智能卡的空间和处理器速度的约束,一个应用程序在Java卡上运行时面临的最大问题是存储空间的不足和对程序执行时间的严格限制。因此,对下载到卡中的字节码进行优化是十分必要的。本文提出了一种综合使用扩展指令集和分段压缩算法的Java卡字节码优化器的设计方案,通过对字节码文件的优化,可得到占用空间较少且没有降低执行速率的字节码文件。  相似文献   

16.
Design by Contract is a software engineering practice that allows semantic information to be added to a class or interface to precisely specify the conditions that are required for its correct operation. The basic constructs of Design by Contract are method preconditions and postconditions, and class invariants. This paper presents a detailed design and implementation overview of jContractor, a freely available tool that allows programmers to write “contracts' as standard Java methods following an intuitive naming convention. Preconditions, postconditions, and invariants can be associated with, or inherited by, any class or interface. jContractor performs on-the-fly bytecode instrumentation to detect violation of the contract specification during a program's execution. jContractor's bytecode engineering technique allows it to specify and check contracts even when source code is not available. jContractor is a pure Java library providing a rich set of syntactic constructs for expressing contracts without extending the Java language or runtime environment. These constructs include support for predicate logic expressions, and referencing entry values of attributes and return values of methods. Fine grain control over the level of monitoring is possible at runtime. Since contract methods are allowed to use unconstrained Java expressions, in addition to runtime verification they can perform additional runtime monitoring, logging, and analysis.  相似文献   

17.
Cost analysis statically approximates the cost of programs in terms of their input data size. This paper presents, to the best of our knowledge, the first approach to the automatic cost analysis of object-oriented bytecode programs. In languages such as Java and C#, analyzing bytecode has a much wider application area than analyzing source code since the latter is often not available. Cost analysis in this context has to consider, among others, dynamic dispatch, jumps, the operand stack, and the heap. Our method takes a bytecode program and a cost model specifying the resource of interest, and generates cost relations which approximate the execution cost of the program with respect to such resource. We report on COSTA, an implementation for Java bytecode which can obtain upper bounds on cost for a large class of programs and complexity classes. Our basic techniques can be directly applied to infer cost relations for other object-oriented imperative languages, not necessarily in bytecode form.  相似文献   

18.
A portable CPU-management framework for Java   总被引:1,自引:0,他引:1  
The Java resource accounting framework, second edition (J-RAF2), is a portable CPU-management framework for Java environments. It is based on fully automated program-transformation techniques applied at the bytecode level and can be used with every standard Java virtual machine. J-RAF2 modifies applications, libraries, and the Java development kit itself to expose details regarding thread execution. This article focuses on the extensible runtime APIs, which are designed to let developers tailor management policies to their needs.  相似文献   

19.
季刚 《计算机时代》2013,(12):50-51,54
数据库是各个气象信息系统的基础,为了保证气象信息系统中数据库的持续可靠和高性能运行,需要对数据库性能进行监控,依据数据库性能监控结果及时地做出适当调整.根据实际需求摸索了一种利用SQL语句实现数据库性能监控的方法,具体探讨了如何利用SQL语句实现对数据库性能监控.该方法的应用对于数据库性能监控有指导意义.  相似文献   

20.
Java just‐in‐time compilers often compile only hot methods because the compilation overhead is a part of the running time. This requires precise and efficient hot spot detection, which includes distinguishing hot methods from cold ones, detecting them as early as possible, and paying a small detection overhead. Hot spot detection is especially important in embedded applications because they show more of a start‐up phase behavior of a regular application where methods are not executed heavily, so the hot methods are not definite. Because a long‐running method is likely to be a hot method, we can detect a hot method by measuring its running time during interpretation. However, precise measurement of the running time during execution is too expensive, especially in embedded systems, so many counter‐based heuristics have been proposed to estimate it such as Oracle's HotSpot heuristic. One problem is that although the overhead of these heuristics is low, they do not estimate the running time precisely, which may lead to imprecise hot spot detection.This paper proposes a new hot spot detection heuristic called flow‐sensitive runtime estimation, which can estimate the running time more precisely than others with a relatively low overhead. It only counts important bytecode instructions dynamically, but it can obtain the precise count of all interpreted bytecode instructions with a simple arithmetic calculation. We also propose a static analysis technique to predict those hot methods which spends a huge execution time once invoked, so as to compile them at their first invocation. Our experimental results show that these techniques can improve the performance by as much as an average of 7.4% compared with the HotSpot heuristic for the benchmarks when they run once, which is often regarded as showing the start‐up phase behavior. Even for real embedded Java applications such as the digital TV Java Xlet applications, our techniques can improve the user response time by an average of 7.1%. Copyright © 2015 John Wiley & Sons, Ltd.  相似文献   

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

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