天堂国产午夜亚洲专区-少妇人妻综合久久蜜臀-国产成人户外露出视频在线-国产91传媒一区二区三区

當(dāng)前位置:主頁 > 碩博論文 > 信息類碩士論文 >

使用離線profile提升JavaScript程序的類型可預(yù)測性

發(fā)布時(shí)間:2019-01-10 18:12
【摘要】:主流的JavaScript引擎(如V8)都使用了類型特化技術(shù)來優(yōu)化程序性能,這種技術(shù)需要在運(yùn)行時(shí)預(yù)測各個(gè)程序點(diǎn)的變量的類型集合。但JavaScript語言的動態(tài)性會降低程序的類型可預(yù)測性,使得引擎對類型預(yù)測失敗(導(dǎo)致優(yōu)化代碼發(fā)生Deoptimization,即脫優(yōu)化)或者產(chǎn)生較差的預(yù)測結(jié)果(導(dǎo)致生成低質(zhì)量的代碼),對程序性能造成負(fù)面影響。本文通過分析Octane、Kraken和SunSpider測試集中的程序,發(fā)現(xiàn)了提高程序類型可預(yù)測性的策略,并據(jù)此設(shè)計(jì)實(shí)現(xiàn)了基于離線profile的優(yōu)化方案。本文的主要貢獻(xiàn)如下:(1)分析這些測試集中的應(yīng)用程序在運(yùn)行過程中的行為,提出通過提高類型關(guān)聯(lián)度來提升類型可預(yù)測性的策略。本文從48個(gè)應(yīng)用程序中總結(jié)出了 6種會導(dǎo)致Deoptimization的模式,并分析了它們和引擎類型系統(tǒng)的關(guān)聯(lián)。分析結(jié)果表明,可以通過增加類型之間的聯(lián)系(稱為類型關(guān)聯(lián)度)來提升類型可預(yù)測性。(2)根據(jù)引擎為每個(gè)屬性訪問點(diǎn)的對象所預(yù)測的類型集合,分析每個(gè)集合中類型之間的關(guān)聯(lián),提出通過調(diào)整對象布局來提高類型關(guān)聯(lián)度的策略。通過分析預(yù)測的類型集合大小大于1的屬性訪問點(diǎn),以被訪問屬性為橋梁,將這些類型之間的關(guān)系分為4類,從而提出通過調(diào)整對象布局來增加類型關(guān)聯(lián)度的策略。(3)提出了基于離線Profile的方案來調(diào)整對象布局,并在V8中進(jìn)行了實(shí)現(xiàn)。方案分成三個(gè)階段:插樁、Profiling和優(yōu)化。插樁階段會在程序中根據(jù)(2)中所提到的4種特點(diǎn),識別程序點(diǎn)并安插收集變量類型信息的代碼;Profiling階段執(zhí)行被插樁的代碼收集這些程序點(diǎn)中的類型信息,并進(jìn)一步生成對屬性布局的調(diào)整方案(即屬性調(diào)整參照)。優(yōu)化階段會在啟動時(shí)讀取屬性調(diào)整參照信息,再生成調(diào)整對象布局的優(yōu)化代碼以便增加類型之間的關(guān)聯(lián)度,提高類型可預(yù)測性。實(shí)驗(yàn)顯示,本文的方案在所有測試集上共減少22%的Deoptimization,而且運(yùn)行速度提升最高可達(dá)6%。本文提出了通過增加類型關(guān)聯(lián)度來提高程序類型可預(yù)測性的策略,并提出基于離線profile的方案來調(diào)整對象布局,以增加類型關(guān)聯(lián)度。此外,本文對常見代碼模式的分析總結(jié),可供JavaScript程序員和語言引擎優(yōu)化工作者參考。
[Abstract]:Mainstream JavaScript engines, such as V8, use type-specific techniques to optimize program performance, which requires predicting the type set of variables at run time for each program point. But the dynamic nature of the JavaScript language reduces the type predictability of the program, causing the engine to fail to predict the type (causing the optimization code to be Deoptimization, or de-optimized) or to produce poor prediction results (resulting in the generation of low-quality code). It can have a negative effect on the procedure. Based on the analysis of programs in Octane,Kraken and SunSpider test sets, a strategy to improve the predictability of program types is found, and an optimization scheme based on offline profile is designed and implemented. The main contributions of this paper are as follows: (1) analyze the behavior of the applications in these test sets during the running process and propose a strategy to improve the predictability of the types by improving the correlation degree of the types. This paper summarizes six patterns that lead to Deoptimization from 48 applications and analyzes their association with engine type systems. The analysis results show that type predictability can be enhanced by increasing the relationship between types (called type correlation). (2) based on the type set predicted by the engine for each attribute access point object, This paper analyzes the relationship between types in each set and proposes a strategy to improve the correlation of types by adjusting the layout of objects. By analyzing the attribute access points whose size of the predicted type set is greater than 1, the relationship between these types is divided into four categories, taking the visited attributes as the bridge. Thus, the strategy of increasing type correlation by adjusting object layout is put forward. (3) A scheme based on offline Profile is proposed to adjust object layout, which is implemented in V8. The scheme is divided into three stages: pile insertion, Profiling and optimization. According to the four characteristics mentioned in (2), the program points will be identified and the code of collecting variable type information will be inserted in the program. The Profiling phase executes the code of the inserted pile to collect the type information in these program points and further generate the adjustment scheme for the property layout (that is, the attribute adjustment reference). In the optimization phase, the attribute adjustment reference information is read at startup, and the optimization code is generated to adjust the layout of the object in order to increase the correlation between the types and improve the predictability of the types. The experimental results show that the proposed scheme reduces 22% of Deoptimization, on all test sets and increases the running speed by up to 6%. This paper proposes a strategy to improve the predictability of program types by increasing the type correlation degree, and proposes a scheme based on offline profile to adjust the object layout to increase the type correlation degree. In addition, the analysis of common code patterns can be used as a reference for JavaScript programmers and language engine optimizers.
【學(xué)位授予單位】:中國科學(xué)技術(shù)大學(xué)
【學(xué)位級別】:碩士
【學(xué)位授予年份】:2017
【分類號】:TP312.2

【相似文獻(xiàn)】

相關(guān)期刊論文 前10條

1 周輝騰;用JavaScript自動選擇留言板[J];上海微型計(jì)算機(jī);2000年Z3期

2 孫小淋;;基于JavaScript的消息管理機(jī)制探討[J];軟件;2013年07期

3 洪留榮,賀蘊(yùn)普,于娟;用JavaScript實(shí)現(xiàn)WEB數(shù)據(jù)庫的交并集查詢[J];計(jì)算機(jī)系統(tǒng)應(yīng)用;1999年04期

4 張志遠(yuǎn);JavaScript與客戶端安全[J];東莞理工學(xué)院學(xué)報(bào);2002年02期

5 陳曉勇,沈良瓊;JavaScript在科學(xué)設(shè)計(jì)與計(jì)算中的應(yīng)用[J];西南科技大學(xué)學(xué)報(bào)(自然科學(xué)版);2002年03期

6 柯琦;;JavaScript程序設(shè)計(jì)基礎(chǔ)課程教學(xué)淺析[J];教育教學(xué)論壇;2013年05期

7 ;千里之堤會毀于一穴嗎? Java、JavaScript的漏洞既有可能減小障礙,也會發(fā)生重大問題[J];每周電腦報(bào);1997年37期

8 汪迎春;;基于JavaScript技術(shù)的網(wǎng)頁課程設(shè)計(jì)項(xiàng)目設(shè)計(jì)[J];信息與電腦(理論版);2013年10期

9 田會;;JavaScript與Java在Web開發(fā)中的應(yīng)用與區(qū)別[J];電子技術(shù)與軟件工程;2014年09期

10 李軼;;基于JavaScript的面向?qū)ο蟪绦蛟O(shè)計(jì)研究[J];江漢大學(xué)學(xué)報(bào)(自然科學(xué)版);2010年03期

相關(guān)會議論文 前1條

1 段壽建;張旭潔;胡紹波;李忠態(tài);;基于JavaScript和PHP的多級聯(lián)動下拉菜單的設(shè)計(jì)與實(shí)現(xiàn)[A];AECC專題學(xué)術(shù)研討會論文集[C];2007年

相關(guān)重要報(bào)紙文章 前4條

1 浙江 潘賢林;用 JavaScript 批量瀏覽圖片[N];電腦報(bào);2001年

2 趙澤欣;老道的JavaScript精華子集[N];中華讀書報(bào);2012年

3 鄧飛;JavaScript網(wǎng)頁特效[N];中國電腦教育報(bào);2002年

4 于翔;JavaScript升級引發(fā)微軟、Mozilla論戰(zhàn)[N];網(wǎng)絡(luò)世界;2007年

相關(guān)碩士學(xué)位論文 前8條

1 林水明;不透明謂詞在JavaScript代碼保護(hù)的應(yīng)用研究[D];廣東工業(yè)大學(xué);2016年

2 黎遇軍;使用離線profile提升JavaScript程序的類型可預(yù)測性[D];中國科學(xué)技術(shù)大學(xué);2017年

3 吳通;基于程序分析和機(jī)器學(xué)習(xí)的JavaScript代碼推薦研究[D];上海交通大學(xué);2014年

4 郭小福;嵌入式JavaScript引擎的優(yōu)化與實(shí)現(xiàn)[D];電子科技大學(xué);2012年

5 柯宏;嵌入式JavaScript解釋器在機(jī)頂盒中的設(shè)計(jì)與實(shí)現(xiàn)[D];華中科技大學(xué);2007年

6 張銳;嵌入式JavaScript引擎即時(shí)編譯器的研究與設(shè)計(jì)[D];電子科技大學(xué);2011年

7 徐青;JavaScript惡意代碼檢測技術(shù)研究[D];西南交通大學(xué);2014年

8 余啟洋;嵌入式JavaScript引擎并行化研究與設(shè)計(jì)[D];電子科技大學(xué);2013年

,

本文編號:2406631

資料下載
論文發(fā)表

本文鏈接:http://sikaile.net/shoufeilunwen/xixikjs/2406631.html


Copyright(c)文論論文網(wǎng)All Rights Reserved | 網(wǎng)站地圖 |

版權(quán)申明:資料由用戶ac680***提供,本站僅收錄摘要或目錄,作者需要刪除請E-mail郵箱bigeng88@qq.com