name: JIT编译 描述: 即时编译专家技能,包括性能分析、分层编译和去优化 类别: 运行时优化 允许使用的工具:
- 读取
- 写入
- 编辑
- 全局匹配
- 文本搜索
- Bash
JIT编译技能
概述
即时编译专家技能,包括性能分析、分层编译和去优化。
能力
- 实现执行性能分析和热点路径检测
- 设计分层编译策略(基线层 + 优化层)
- 实现栈上替换(OSR)
- 实现带防护机制的推测性优化
- 设计去优化帧重建
- 实现内联缓存和类型反馈
- 设计代码缓存管理和淘汰机制
- 实现方法内联启发式算法
目标流程
- jit-compiler-development.js
- bytecode-vm-implementation.js
- interpreter-implementation.js
依赖项
V8/HotSpot架构参考
使用指南
- 分层方法:从基线层开始,当有性能分析数据时添加优化层
- 基于性能分析的优化:使用性能分析数据指导优化决策
- 推测性优化:为推测性优化实现防护机制,并确保干净的去优化
- 栈上替换:为长时间运行的循环实现OSR,以便在执行过程中受益于优化
- 代码缓存:实现代码缓存管理以处理内存压力
输出模式
{
"type": "object",
"properties": {
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"trigger": { "type": "string" }
}
}
},
"profilingMethod": {
"type": "string",
"enum": ["counters", "sampling", "tracing"]
},
"osrSupport": { "type": "boolean" },
"generatedFiles": {
"type": "array",
"items": { "type": "string" }
}
}
}