ddg是什么意思| 甲状腺结节3类什么意思| 什么是马甲线| 吃红萝卜有什么好处| 什么是超话| 红细胞高是什么意思| a02是什么牌子| ed是什么意思| 什么鱼清蒸好吃| 尿泡多是什么原因| 空心菜什么人不能吃| 风情万种的意思是什么| 什么是三观不合| 根管是什么| 黄酒是什么酒| 中伏是什么意思| 鬓角长痘痘是什么原因| 木吉他什么牌子比较好| 灵芝孢子粉有什么功效| 灵官爷是什么神| 95年是什么命| 胃出血有什么症状| 时间的定义是什么| 耳钉后面的塞子叫什么| 农历10月26日是什么星座| 山楂和什么泡水喝减肥效果最好| 枸杞配什么壮阳| 茉莉花是什么颜色| 翊字五行属什么| 画什么点睛| 马齿苋对什么病最有效| 孕妇心情不好对胎儿有什么影响| 什么菜降血压| 梦见掉了三颗牙齿是什么意思| 浅黄色是什么颜色| 卖萌什么意思| 遭罪是什么意思| 10.30是什么星座| 60岁男人喜欢什么样的女人| a货翡翠是什么意思| 转念是什么意思| 又热又冷是什么原因| 吃什么补锌| 多米诺骨牌是什么意思| 代谢慢是什么原因| 吃什么全面补充维生素| 晚上10点是什么时辰| 肛瘘是什么意思| 什么叫屈光不正| 嵌体是什么| 浑浊是什么意思| 香其酱是什么酱| 学医需要什么条件| 肝囊肿吃什么药| 处男什么意思| 名落孙山的意思是什么| 梦见买面条有什么预兆| 多动症去医院挂什么科室| 反应是什么意思| 口上长水泡是什么原因| darling是什么意思| 马牛羊鸡犬豕中的豕指的是什么| 淋巴细胞降低说明什么| 安全总监是什么级别| e m s是什么快递| 职场是什么意思| 定妆用什么好| 吃环孢素有什么副作用| 黄精有什么功效| 钾离子低的原因是什么| 口腔溃疡一直不好是什么原因| 朱元璋为什么要杀刘伯温| 岁寒三友是什么意思| 尿蛋白高不能吃什么食物| dex是什么药| 左眼跳什么| 什么是作风建设| lp0是什么意思| 吃什么维生素对眼睛好| 龙虾的血是什么颜色的| 肾炎康复片主要是治疗什么| 插茱萸是什么意思| 淋巴细胞计数偏低是什么原因| 五月什么星座| 孕早期宫缩是什么感觉| 稻谷是什么| 碳酸氢钠是什么| 千千阙歌什么意思| 中国信仰什么教| 营救是什么意思| 过敏性鼻炎引起眼睛痒用什么药| fvc是什么意思| 蚂蚁为什么会咬人| 腰间盘突出是什么症状| 梅雨季节是什么时候| 邕是什么意思| nsaid是什么药| 玫瑰花泡水喝有什么好处| 天龙八部是指佛教中的什么| rover是什么意思| 豌豆是什么豆| 东北和山东有什么区别| 亲和力是什么意思| 豆是什么结构| 潮喷是什么感觉| 1977年出生属什么生肖| 阿胶是什么做的| 非亲非故是什么意思| 懵懂少年是什么意思| 吃什么补维生素| 钛对人体有什么好处| 分泌性中耳炎吃什么药| 眼有眼屎是什么原因| 梦见蛇是什么预兆| 奶黄包的馅是什么做的| 山豆念什么| 猴子怕什么| 闺蜜是什么意思| 土字旁有什么字| 什么叫肠化| 什么的恐龙| cif是什么意思| 司令是什么军衔| 小肚子疼挂什么科| 牙疼喝什么药| 打嗝是什么原因| 什么地站着| 88年什么命| cm医学上是什么意思| 2022年属什么生肖| 保妇康栓治疗什么妇科病| 吃什么不长肉| 壬子五行属什么| 69属什么| 乐五行属什么| 陈皮有什么作用| 尿酸高不能吃什么东西| 乙肝235阳性是什么意思| 海澜之家属于什么档次| 一语惊醒梦中人是什么意思| 洗涤心灵是什么意思| 三月29号是什么星座| 妈妈的妈妈叫什么| 黑色的玫瑰花代表什么| 什么药治痒效果最好| 梦见自己鞋子破了是什么意思| 冢字的意思是什么| 脚拇指外翻是什么原因造成的| 宝宝什么时候开始长牙| 三月14号是什么星座| 科员是什么级别| 炒鱿鱼是什么意思| 头晕目眩挂什么科| 热疹症状该用什么药膏| 怀孕梦见蛇是什么意思| 耳根子软是什么意思| 什么是频率| 胎儿右肾盂分离是什么意思| 两袖清风是什么生肖| 鞋底md是什么材质| 安属于五行属什么| gp是什么的缩写| 海底捞是什么| 已读不回是什么意思| 女性血热吃什么好得快| 1618是什么意思| 嗓子疼吃什么| cyl是什么意思| loa是什么胎位| 八月13号是什么星座| 什么辣椒又香又辣| 潘海利根香水什么档次| 放屁很臭是什么原因| 情字五行属什么| 舌头起泡什么原因| 挂妇科门诊都检查什么| 脚有点浮肿是什么原因| 鸡炖什么好吃| 备孕喝豆浆有什么好处| 射手座和什么座最配| 元阳是什么意思| 春天可以干什么| 碧血是什么意思| 什么是高潮| hcg阴性是什么意思| 四眼狗有什么迷信说法| 灼热感是什么样的感觉| 什么是天赋| 蛇冲什么生肖| 梦见小白蛇是什么预兆| 肠炎用什么药好| 输尿管不扩张什么意思| 1月18日什么星座| 胃痛吃什么药效果最好| 葛根粉有什么作用| 膝盖擦伤用什么药| 什么是湿疹| 251是什么意思| 棺材一般用什么木头| 1206是什么星座| 茯苓有什么功效和作用| 刘邦是汉什么帝| 梦到自己孩子死了是什么征兆| 我想成为一个什么样的人| 鱼香肉丝用什么肉做| 4月15日是什么日子| 碳酸氢铵是什么| 81年属鸡是什么命| 血儿茶酚胺是查什么的| 怀孕早期吃什么| 梦特娇属于什么档次| 喝什么茶叶减肥效果最好| 女性后背疼挂什么科室| 草字头的字和什么有关| 晕车是什么原因引起的| 刹是什么意思| 有加有减先算什么| 宫颈机能不全是什么意思| 手麻木吃什么药| 纯净水和矿泉水有什么区别| 四月九号是什么星座| 醋精和白醋有什么区别| 心脏下边是什么器官| 血氧饱和度是什么意思| blm是什么意思| 狗篮子什么意思| 俄罗斯信奉的是什么教| 木命和什么命最配| 橙子是什么季节的水果| 什么叫磨玻璃结节| 519是什么星座| 谨守是什么意思| 闪婚是什么意思| 什么运动瘦肚子最快| 终端是什么意思| 饕餮长什么样子| 破伤风什么时候打最好| 犹太人割礼是什么意思| 菊花脑是什么菜| 进口二甲双胍叫什么| 有什么有什么成语| 诛是什么意思| 中国国菜是什么菜| 手肿脚肿是什么原因引起的| 声字五行属什么| 塑料水杯什么材质好| 上海有什么好玩的地方| 三尖瓣反流什么意思| 肚脐左下方疼是什么原因| 朊病毒是什么| 百依百顺是什么生肖| 强迫症吃什么药| 毛字出头念什么| 六害是什么意思| 功劳叶的别名叫什么| 梦见买衣服是什么预兆| 什么时候收复台湾| 禳是什么意思| 什么药降肌酐| 小孩生日送什么礼物| 牛百叶是什么| 看牙齿挂什么科| 秋五行属什么| 男性hpv检查挂什么科| 百度Jump to content

四川省积极推进中央环保督察反馈意见整改工作 逐一会商整改实施方案

From Wikipedia, the free encyclopedia
百度 从改革开放到今天,已经实践了近40年,创下了人类历史上经济增长率最快、受益人口规模最多的奇迹,从世界上较大的绝对贫困人口社会正在成为世界最大规模的中等收入人口社会。

Tracing just-in-time compilation is a technique used by virtual machines to optimize the execution of a program at runtime. This is done by recording a linear sequence of frequently executed operations, compiling them to native machine code and executing them. In contrast, traditional just-in-time compilation (JIT) compiles each method in turn, without optimizing between them.

Overview

[edit]

Just-in-time compilation is a technique to increase execution speed of programs by compiling parts of a program to machine code at runtime. One way to categorize different JIT compilers is by their compilation scope. Whereas method-based JIT compilers translate one method at a time to machine code, tracing JITs use frequently executed loops as their unit of compilation. Tracing JITs are based on the behavior that many programs spend most of their time in some loops of the program, termed hot loops, and subsequent loop iterations often take similar paths. Virtual machines that have a tracing JIT are often mixed-mode execution environments, meaning that they have either an interpreter, or a method compiler, along with the tracing JIT.

Technical details

[edit]

A tracing JIT compiler goes through various phases at runtime. First, profiling information for loops is collected. After a hot loop has been identified, a special tracing phase is entered, which records all executed operations of that loop. This sequence of operations is called a trace. The trace is then optimized and compiled to machine code. When this loop is executed again, the compiled trace is called instead of the program counterpart.

These steps are explained in detail in the following:

Profiling phase

[edit]

The goal of profiling is to identify hot loops. This is often done by counting the number of iterations for every loop. After the count of a loop exceeds a certain threshold, the loop is considered to be hot, and tracing phase is entered.

Tracing phase

[edit]

In the tracing phase the execution of the loop proceeds normally, but in addition every executed operation is recorded into a trace. The recorded operations are typically stored in a trace tree, often in an intermediate representation (IR). Tracing follows function calls, which leads to them being inlined into the trace. Tracing continues until the loop reaches its end and jumps back to the start.

Since the trace is recorded by following one concrete execution path of the loop, later executions of that trace can diverge from that path. To identify the places where that can happen, special guard instructions are inserted into the trace. One example for such a place are if statements. The guard is a quick check to determine whether the original condition is still true. If a guard fails, the execution of the trace is aborted.

Since tracing is done during execution, the trace can be made to contain runtime information (e.g., type information). This information can later be used in the optimization phase to increase code efficiency.

Optimization and code-generation phase

[edit]

Traces are easy to optimize, since they represent only one execution path, which means that no control flow exists and needs no handling. Typical optimizations include common-subexpression elimination, dead code elimination, register allocation, invariant-code motion, constant folding, and escape analysis.[1]

After the optimization, the trace is turned into machine code. Similarly to optimization, this is easy due to the linear nature of traces.

Execution

[edit]

After the trace has been compiled to machine code, it can be executed in subsequent iterations of the loop. Trace execution continues until a guard fails.

History

[edit]

Whereas the idea of JITs reaches back to the 1960s, tracing JITs have become used more often only recently. The first mention of an idea that is similar to today's idea of tracing JITs was in 1970.[2] It was observed that compiled code could be derived from an interpreter at runtime by simply storing the actions performed during interpretation.

The first implementation of tracing is Dynamo, "a software dynamic optimization system that is capable of transparently improving the performance of a native instruction stream as it executes on the processor".[3] To do this, the native instruction stream is interpreted until a "hot" instruction sequence is found. For this sequence an optimized version is generated, cached and executed.

Dynamo was later extended to DynamoRIO. One DynamoRIO-based project was a framework for interpreter construction that combines tracing and partial evaluation. It was used to "dynamically remove interpreter overhead from language implementations".[4]

In 2006, HotpathVM, the first tracing JIT compiler for a high-level language[citation needed] was developed.[5] This VM was capable of dynamically identifying frequently executed bytecode instructions, which are traced and then compiled to machine code using static single-assignment form (SSA) construction. The motivation for HotpathVM was to have an efficient JVM for resource constrained mobile devices.

Another example of a tracing JIT is TraceMonkey, one of Mozilla’s JavaScript implementations for Firefox (2009).[6] TraceMonkey compiles frequently executed loop traces in the dynamic language JavaScript at runtime and specializes the generated code for the actual dynamic types occurring on each path.

Another project that utilizes tracing JITs is PyPy. It enables the use of tracing JITs for language implementations that were written with PyPy's translation toolchain, thus improving the performance of any program that is executed using that interpreter. This is possible by tracing the interpreter itself, instead of the program that is executed by the interpreter.[7]

Tracing JITs have also been explored by Microsoft in the SPUR project for their Common Intermediate Language (CIL). SPUR is a generic tracer for CIL, which can also be used to trace through a JavaScript implementation.[8]

Example of a trace

[edit]

Consider the following Python program that computes a sum of squares of successive whole numbers until that sum exceeds 100000:

def square(x):
    return x * x

i = 0
y = 0
while True:
    y += square(i)
    if y > 100000:
        break
    i = i + 1

A trace for this program could look something like this:

 loopstart(i1, y1)
 i2 = int_mul(i1, i1)		# i*i
 y2 = int_add(y1, i2)		# y += i*i
 b1 = int_gt(y2, 100000)
 guard_false(b1)
 i3 = int_add(i1, 1)		# i = i+1
 jump(i3, y2)

Note how the function call to square is inlined into the trace and how the if statement is turned into a guard_false.

See also

[edit]

References

[edit]
  1. ^ Bolz, Carl Friedrich; Cuni, Antonio; FijaBkowski, Maciej; Leuschel, Michael; Pedroni, Samuele; Rigo, Armin (January 2011). "Allocation Removal by Partial Evaluation in a Tracing JIT" (PDF). Proceedings of the 20th ACM SIGPLAN workshop on Partial evaluation and program manipulation. PEPM '11. pp. 43–52. doi:10.1145/1929501.1929508. S2CID 15871223. Retrieved 2025-08-05.
  2. ^ Mitchell, James G. (June 29, 1970). The Design and Construction of Flexible and Efficient Interactive Programming Systems (PhD). Carnegie Mellon University. ISBN 978-0-8240-4414-5. LCCN 79050563. OCLC 633313022. S2CID 36249021. Docket AAI7104538. Retrieved 2025-08-05.
  3. ^ Bala, Vasanth; Duesterwald, Evelyn; Banerjia, Sanjeev (May 2000). "Dynamo: A Transparent Dynamic Optimization System" (PDF). Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation. PLDI '00. pp. 1–12. doi:10.1145/349299.349303. ISBN 978-1-58113-199-4. S2CID 53223267. Retrieved 2025-08-05.
  4. ^ Sullivan, Gregory T.; Bruening, Derek L.; Baron, Iris; Garnett, Timothy; Amarasinghe, Saman (June 2003). "Dynamic Native Optimization of Interpreters" (PDF). Proceedings of the 2003 workshop on Interpreters, virtual machines and emulators. IVME '03. pp. 50–57. CiteSeerX 10.1.1.14.9819. doi:10.1145/858570.858576. ISBN 978-1-58113-655-5. S2CID 509405. Retrieved 2025-08-05.
  5. ^ Gal, Andreas; Probst, Christian W.; Franz, Michael (June 2006). "HotpathVM: An Effective JIT Compiler for Resource-constrained Devices" (PDF). Proceedings of the 2nd international conference on Virtual execution environments. VEE '06. pp. 144–153. doi:10.1145/1134760.1134780. ISBN 978-1-59593-332-4. S2CID 17846788. QID 56580114. Retrieved 2025-08-05.
  6. ^ Gal, Andreas; Orendorff, Jason; Ruderman, Jesse; Smith, Edwin W.; Reitmaier, Rick; Bebenita, Michael; Chang, Mason; Franz, Michael; Eich, Brendan; Shaver, Mike; Anderson, David; Mandelin, David; Haghighat, Mohammad R.; Kaplan, Blake; Hoare, Graydon; Zbarsky, Boris (June 2009). "Trace-based Just-in-Time Type Specialization for Dynamic Languages" (PDF). Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation. PLDI '09. pp. 465–478. doi:10.1145/1542476.1542528. ISBN 978-1-60558-392-1. S2CID 207172806. Retrieved 2025-08-05.
  7. ^ Bolz, Carl Friedrich; Cuni, Antonio; Fijalkowski, Maciej; Rigo, Armin (July 2009). "Tracing the Meta-Level: PyPy's Tracing JIT Compiler" (PDF). Proceedings of the 4th workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages and Programming Systems. ICOOOLPS '09. pp. 18–25. doi:10.1145/1565824.1565827. ISBN 978-1-60558-541-3. S2CID 7478596. Retrieved 2025-08-05.
  8. ^ Bebenita, Michael; Brandner, Florian; Fahndrich, Manuel; Logozzo, Francesco; Schulte, Wolfram; Tillmann, Nikolai; Venter, Herman (October 2010). "SPUR: A Trace-Based JIT Compiler for CIL" (PDF). Proceedings of the ACM international conference on Object oriented programming systems languages and applications. OOPSLA '10. pp. 708–725. doi:10.1145/1869459.1869517. ISBN 978-1-4503-0203-6. S2CID 3395746. Retrieved 2025-08-05.
[edit]
6月16日是什么日子 看守所和拘留所有什么区别 男性性功能下降是什么原因 电气火灾用什么灭火 什么是庞氏骗局
查甲状腺挂什么科 小拇指发麻是什么原因 打喷嚏是什么原因引起的 炒菜用什么锅好 器质性心脏病是什么意思
梦见自己结婚了是什么意思 龙的幸运色是什么颜色 什么是丹凤眼 撅眼是什么原因造成的 银杏属于什么植物
张学良为什么被囚禁 猴赛雷什么意思 属羊的守护神是什么菩萨 槊是什么意思 什么是点天灯
武警是干什么的hcv8jop6ns6r.cn 83年是什么年yanzhenzixun.com 久视伤血是什么意思hcv8jop9ns1r.cn 容易淤青的体质叫什么hcv7jop9ns4r.cn 驻马店以前叫什么名字hcv8jop1ns9r.cn
丑未戌三刑 会发生什么hcv8jop0ns4r.cn im医学上是什么意思inbungee.com sephora是什么牌子zhongyiyatai.com 什么的微风填空jasonfriends.com 最好的烟是什么牌子hcv7jop5ns5r.cn
抠是什么意思hcv7jop7ns2r.cn 子午相冲是什么生肖hcv9jop1ns0r.cn 弦脉是什么意思hcv8jop4ns6r.cn 长疖子用什么药hcv8jop7ns8r.cn 经常头晕是什么原因hcv9jop3ns2r.cn
穿什么衣服好看hcv8jop2ns4r.cn 尿酸高什么不能吃hcv8jop1ns9r.cn 1月1日是什么日子hcv9jop5ns7r.cn 南瓜和什么相克hcv9jop4ns7r.cn 为什么不能空腹喝豆浆hcv8jop5ns5r.cn
百度