高级检索
    唐 锋, 武成岗, 张兆庆, 杨 浩. 二进制翻译应用级异常处理[J]. 计算机研究与发展, 2006, 43(12): 2166-2173.
    引用本文: 唐 锋, 武成岗, 张兆庆, 杨 浩. 二进制翻译应用级异常处理[J]. 计算机研究与发展, 2006, 43(12): 2166-2173.
    Tang Feng, Wu Chenggang, Zhang Zhaoqing, Yang Hao. Exception Handling in Application Level Binary Translation[J]. Journal of Computer Research and Development, 2006, 43(12): 2166-2173.
    Citation: Tang Feng, Wu Chenggang, Zhang Zhaoqing, Yang Hao. Exception Handling in Application Level Binary Translation[J]. Journal of Computer Research and Development, 2006, 43(12): 2166-2173.

    二进制翻译应用级异常处理

    Exception Handling in Application Level Binary Translation

    • 摘要: 二进制翻译可以用于解决遗产代码的迁移问题,也可以实现不同硬件平台之间软件的通用.异常处理是二进制翻译的一个重要方面,如何解决异常处理和二进制翻译效率的矛盾是问题的关键.提出了在库函数包装层面处理主动异常和被动异常的方法,一个算法可以高效处理信号异常,另一个算法使用栈展开技术,得到调用地址用于处理try catch异常.实验结果表明,上述方法能够正确处理异常函数,同时对于普通应用程序加入异常处理机制之后性能并不受影响.

       

      Abstract: Binary translation is applied for not only the legacy code porting but also software being used in different hardware platform. Exception handling is a most important aspect of binary translation research. How to balance the exception handling and the efficiency of binary translation is the key problem. Two methods to solve the active and passive exception handling in the library function jacket level are presented. One algorithm comes up to deal with efficienly the passive exception such as signal exception efficiently:if the exception handler doesn't use the machine state after exception happens, the translator doesn't preserve the precise machine state in every block. Thus, the cost for exception handling is low. For the Spec 2000 CPU ref input set, the cost, when the algorithm is applied to the translator, is an average 15.42 percent lower than the cost when the algorithm is not applied to the system. Another algorithm using emulated stack unwinding is submitted to find the calling address to help dealing with the active exception such as try catch exception in C++. The experiments prove the validity of the two ways of handling the exception. Adding the exception mechanics to the system doesn't decrease the performance of the common programs. These algorithms solve the exception handler in the application level program in binary translation quickly and correctly.

       

    /

    返回文章
    返回