Enviar pesquisa
Carregar
Многоуровневая компиляция в HotSpot JVM
•
1 gostou
•
1,006 visualizações
Vladimir Ivanov
Seguir
@ J1 2012 Moscow
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 19
Baixar agora
Baixar para ler offline
Recomendados
Social media and online video for mere mortals
Social media and online video for mere mortals
Rich Dietz
Dia mundial poesia compatible
Dia mundial poesia compatible
jrjsabadellbiblioteca
Online Fundraising 101
Online Fundraising 101
Rich Dietz
Furnished Apartments Nairobi
Furnished Apartments Nairobi
Africa Homesteads
Hcv
Hcv
Aleksandra Popovich
Joana raspall
Joana raspall
jrjsabadellbiblioteca
Dites populars i refranys de carnestoltes
Dites populars i refranys de carnestoltes
jrjsabadellbiblioteca
"What's New in HotSpot JVM 8" @ JPoint 2014, Moscow, Russia
"What's New in HotSpot JVM 8" @ JPoint 2014, Moscow, Russia
Vladimir Ivanov
Recomendados
Social media and online video for mere mortals
Social media and online video for mere mortals
Rich Dietz
Dia mundial poesia compatible
Dia mundial poesia compatible
jrjsabadellbiblioteca
Online Fundraising 101
Online Fundraising 101
Rich Dietz
Furnished Apartments Nairobi
Furnished Apartments Nairobi
Africa Homesteads
Hcv
Hcv
Aleksandra Popovich
Joana raspall
Joana raspall
jrjsabadellbiblioteca
Dites populars i refranys de carnestoltes
Dites populars i refranys de carnestoltes
jrjsabadellbiblioteca
"What's New in HotSpot JVM 8" @ JPoint 2014, Moscow, Russia
"What's New in HotSpot JVM 8" @ JPoint 2014, Moscow, Russia
Vladimir Ivanov
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
Vladimir Ivanov
"Optimizing Memory Footprint in Java" @ JEEConf 2013, Kiev, Ukraine
"Optimizing Memory Footprint in Java" @ JEEConf 2013, Kiev, Ukraine
Vladimir Ivanov
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
Vladimir Ivanov
JVM JIT-compiler overview @ JavaOne Moscow 2013
JVM JIT-compiler overview @ JavaOne Moscow 2013
Vladimir Ivanov
"Invokedynamic: роскошь или необходимость?"@ JavaOne Moscow 2013
"Invokedynamic: роскошь или необходимость?"@ JavaOne Moscow 2013
Vladimir Ivanov
"G1 GC и Обзор сборки мусора в HotSpot JVM" @ JUG SPb, 31-05-2012
"G1 GC и Обзор сборки мусора в HotSpot JVM" @ JUG SPb, 31-05-2012
Vladimir Ivanov
Управление памятью в Java: Footprint
Управление памятью в Java: Footprint
Vladimir Ivanov
G1 GC: Garbage-First Garbage Collector
G1 GC: Garbage-First Garbage Collector
Vladimir Ivanov
"Диагностирование проблем и настройка GC в HotSpot JVM" (JEEConf, Киев, 2011)
"Диагностирование проблем и настройка GC в HotSpot JVM" (JEEConf, Киев, 2011)
Vladimir Ivanov
Mais conteúdo relacionado
Mais de Vladimir Ivanov
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
Vladimir Ivanov
"Optimizing Memory Footprint in Java" @ JEEConf 2013, Kiev, Ukraine
"Optimizing Memory Footprint in Java" @ JEEConf 2013, Kiev, Ukraine
Vladimir Ivanov
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
Vladimir Ivanov
JVM JIT-compiler overview @ JavaOne Moscow 2013
JVM JIT-compiler overview @ JavaOne Moscow 2013
Vladimir Ivanov
"Invokedynamic: роскошь или необходимость?"@ JavaOne Moscow 2013
"Invokedynamic: роскошь или необходимость?"@ JavaOne Moscow 2013
Vladimir Ivanov
"G1 GC и Обзор сборки мусора в HotSpot JVM" @ JUG SPb, 31-05-2012
"G1 GC и Обзор сборки мусора в HotSpot JVM" @ JUG SPb, 31-05-2012
Vladimir Ivanov
Управление памятью в Java: Footprint
Управление памятью в Java: Footprint
Vladimir Ivanov
G1 GC: Garbage-First Garbage Collector
G1 GC: Garbage-First Garbage Collector
Vladimir Ivanov
"Диагностирование проблем и настройка GC в HotSpot JVM" (JEEConf, Киев, 2011)
"Диагностирование проблем и настройка GC в HotSpot JVM" (JEEConf, Киев, 2011)
Vladimir Ivanov
Mais de Vladimir Ivanov
(9)
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
"Optimizing Memory Footprint in Java" @ JEEConf 2013, Kiev, Ukraine
"Optimizing Memory Footprint in Java" @ JEEConf 2013, Kiev, Ukraine
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
JVM JIT-compiler overview @ JavaOne Moscow 2013
JVM JIT-compiler overview @ JavaOne Moscow 2013
"Invokedynamic: роскошь или необходимость?"@ JavaOne Moscow 2013
"Invokedynamic: роскошь или необходимость?"@ JavaOne Moscow 2013
"G1 GC и Обзор сборки мусора в HotSpot JVM" @ JUG SPb, 31-05-2012
"G1 GC и Обзор сборки мусора в HotSpot JVM" @ JUG SPb, 31-05-2012
Управление памятью в Java: Footprint
Управление памятью в Java: Footprint
G1 GC: Garbage-First Garbage Collector
G1 GC: Garbage-First Garbage Collector
"Диагностирование проблем и настройка GC в HotSpot JVM" (JEEConf, Киев, 2011)
"Диагностирование проблем и настройка GC в HotSpot JVM" (JEEConf, Киев, 2011)
Многоуровневая компиляция в HotSpot JVM
1.
India
3–4 May 2012 San Francisco September 30–October 4, 2012 1 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
2.
Многоуровневая компиляция в
HotSpot JVM Владимир Иванов Oracle Corporation 2 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 vladimir.x.ivanov@oracle.com reserved.
3.
JIT-компиляторы в HotSpot
JVM • Client / C1 • java -client … • быстро генерирует приемлемый машинный код • Базовые оптимизации • Не требуется профиль исполнения кода • Порог компиляции: 1.5к вызовов • Server / C2 • java -server … • Генерирует максимально быстрый код • Большое количество агрессивных оптимистичных оптимизаций • Порог компиляции: 10к вызовов 3 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
4.
JIT-компиляторы в HotSpot
JVM Сильные и слабые стороны • Client / C1 “+” Быстрый старт приложения “-” Страдает пиковая производительность • Server / C2 “+” Быстрый код для «горячих» методов “-” Требуется долгий «разогрев» приложения 4 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
5.
Многоуровневая компиляци
Цели • Взять лучшее от 2 компиляторов • Производительность кода серверного компилятора • Скорость запуска, как с клиентским компилятором • Автоматическая настройка 5 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
6.
Сценарий работы
• Начать исполнение в интерпретаторе • Быстро создать версию C1 для профилирования • На основе собранной информации скомпилировать C2 6 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
7.
Уровни компиляции
• 5 уровней • #0: интерпретатор • профилирование по необходимости • #1: C1 без профилирования • #2: С1 с базовым профилированием • Invocation & backedge counters • #3: С1 с полным профилированием • Invocation & backedge counters + MDO • На 30% медленнее #2 • #4: C2 7 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
8.
Профилирование
• Сбор информации о деталях исполнения метода • Требуется C2 для ряда оптимизаций • Профилирование происходит на уровнях #0 и #3 • Что интересует • Ветвления • Вызовы виртуальных методов • Проверки типов • сheckcast, instanceof, aastore • null-значения 8 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
9.
Эргономика
• Порог на изменение уровня зависит от длины очереди на компиляцию • Учитывается очередь и С1, и С2 • Приоритизация методов в очереди 9 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
10.
Уровни компиляции
3 4 0 2 1 0: интерпретатор 1: C1 w/o profiling 2: С1 + basic profiling 3: С1 + full profiling 4: C2 10 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
11.
Стандартный сценарий
3 4 0 2 1 0: интерпретатор 1: C1 w/o profiling 0→3→4 2: С1 + basic profiling 3: С1 + full profiling 4: C2 11 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
12.
Компиляция простого метода
3 4 0 2 1 0: интерпретатор 1: C1 w/o profiling 0 → (2,3) → 1 2: С1 + basic profiling 3: С1 + full profiling 4: C2 12 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
13.
Очередь на компиляцию
С1 переполнена 3 4 0 2 1 0: интерпретатор 1: C1 w/o profiling 0 → (3 → 2) → 4 2: С1 + basic profiling 3: С1 + full profiling 4: C2 13 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
14.
Очередь на компиляцию
C2 переполнена 3 4 0 2 1 0: интерпретатор 1: C1 w/o profiling 0→2→3→4 2: С1 + basic profiling 3: С1 + full profiling 4: C2 14 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
15.
Метод не может
быть скомпилирован C1 3 4 0 2 1 0: интерпретатор 1: C1 w/o profiling 0→4 2: С1 + basic profiling 3: С1 + full profiling 4: C2 15 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
16.
Деоптимизация
3 4 0 2 1 0: интерпретатор 1: C1 w/o profiling (1,2,3,4) → 0 2: С1 + basic profiling 3: С1 + full profiling 4: C2 16 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
17.
Использование
• -XX:+TieredCompilation • В скором будущем режим по-умолчанию – $ java -server … – $ java -client … 17 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
18.
Q&A 18
Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
19.
India
3–4 May 2012 San Francisco September 30–October 4, 2012 19 Copyright © 2012, Oracle and/or its affiliates. All rights Insert Informaion Protection Policy Classification from Slide 7 reserved.
Baixar agora