Oplægget blev givet ved et seminar i InfinIT-interessegruppen Højniveau sprog til indlejrede systemer den 22. april 2009.
Læs mere om interessegruppen på http://www.infinit.dk/dk/interessegrupper/hoejniveau_sprog_til_indlejrede_systemer/
A Business Process Management System (BPMS) offers you the capabilities to better manage and streamline your business processes. JBoss jBPM continues its vision in this area by offering a lightweight process engine for executing business processes, combined with the necessary services and tooling to support business processes in their entire life cycle. This allows not only developers but also business users to manage your business processes more efficiently.
A lot has happened in the BPM area over the last few years, with the introduction of the BPMN 2.0 standard, the increasing interest in more dynamic and adaptive processes, integration with business rules and event processing, case management, etc. In this session, we will show you how jBPM5 tackles these challenges, discuss migration to this new platform and give you an overview of its most important features.
OpenSAF Symposium_Architecture_and_Roadmap_Update9.19.11OpenSAF Foundation
OpenSAF is a mature platform that has undergone a series of architectural improvements and changes, making it the leading solution in the commercial-off-the-shelf (COTS) HA middleware industry. In particular, Release 4.0, released in mid 2010, is the biggest step to date in the direction of implementing a full suite of SA Forum services. This session will provide an overview of the OpenSAF architecture and specifically shed light on a series of improvements for Release 4.1 and the upcoming Release 4.2 that make OpenSAF the most scalable, robust and comprehensive implementation of the SA Forum standards. Lastly, this session will survey the OpenSAF roadmap and discuss the key priorities for OpenSAF over the next year.
A Java Implementer's Guide to Boosting Apache Spark Performance by Tim Ellison.J On The Beach
Apache Spark has rocked the big data landscape, quickly becoming the largest open source big data community with over 750 contributors from more than 200 organizations. Spark's core tenants of speed, ease of use, and its unified programming model fit neatly with the high performance, scalable, and manageable characteristics of modern Java runtimes. In this talk we introduce the Spark programming model, and describe some unique Java runtime capabilities in the JIT, fast networking, serialization techniques, and GPU off-loading that deliver the ultimate big data platform for solving business problems. We will show how solutions, previously infeasible with regular Java programming, become possible with a high performance Spark core runtime, enabling you to solve problems smarter and faster.
Apache Spark has rocked the big data landscape, becoming the largest open source big data community with over 750 contributors from more than 200 organizations. Spark's core tenants of speed, ease of use, and its unified programming model fit neatly with the high performance, scalable, and manageable characteristics of modern Java runtimes. In this talk Tim Ellison, a JVM developer at IBM, shows some of the unique Java 8 capabilities in the JIT compiler, fast networking, serialization techniques, and GPU off-loading that deliver the ultimate big data platform for solving business problems. Tim will demonstrate how solutions, previously infeasible with regular Java programming, become possible with this high performance Spark core runtime, enabling you to solve problems smarter and faster.
Five cool ways the JVM can run Apache Spark fasterTim Ellison
The IBM JVM runs Apache Spark fast! This talk explains some of the findings and optimizations from our experience of running Spark workloads.
The talk was originally presented at the SparkEU Summit 2015 in Amsterdam.
A technical presentation on how Zing changes parts of the JVM to eliminate GC pauses, generate more heavily optimised code from the JIT and reduce the warm up time.
Microservices is the dominant architecture for developing new applications, as it is ideally suited to cloud deployments. When using JVM-based services, each instance works in isolation and has no awareness of previous runs of a service. The Cloud Native Compiler detaches the JIT compiler from individual JVMs and centralises it in the cloud, effectively a JIT-as-a-Service. The benefits of this are caching of compiled code for instant reuse, use of greater resources for higher optimisation as well as many others. The session will discuss the challenges of cloud-based JVMs and how we can significantly improve performance with reduced costs.
Oplægget blev givet ved et seminar i InfinIT-interessegruppen Højniveau sprog til indlejrede systemer den 22. april 2009.
Læs mere om interessegruppen på http://www.infinit.dk/dk/interessegrupper/hoejniveau_sprog_til_indlejrede_systemer/
A Business Process Management System (BPMS) offers you the capabilities to better manage and streamline your business processes. JBoss jBPM continues its vision in this area by offering a lightweight process engine for executing business processes, combined with the necessary services and tooling to support business processes in their entire life cycle. This allows not only developers but also business users to manage your business processes more efficiently.
A lot has happened in the BPM area over the last few years, with the introduction of the BPMN 2.0 standard, the increasing interest in more dynamic and adaptive processes, integration with business rules and event processing, case management, etc. In this session, we will show you how jBPM5 tackles these challenges, discuss migration to this new platform and give you an overview of its most important features.
OpenSAF Symposium_Architecture_and_Roadmap_Update9.19.11OpenSAF Foundation
OpenSAF is a mature platform that has undergone a series of architectural improvements and changes, making it the leading solution in the commercial-off-the-shelf (COTS) HA middleware industry. In particular, Release 4.0, released in mid 2010, is the biggest step to date in the direction of implementing a full suite of SA Forum services. This session will provide an overview of the OpenSAF architecture and specifically shed light on a series of improvements for Release 4.1 and the upcoming Release 4.2 that make OpenSAF the most scalable, robust and comprehensive implementation of the SA Forum standards. Lastly, this session will survey the OpenSAF roadmap and discuss the key priorities for OpenSAF over the next year.
A Java Implementer's Guide to Boosting Apache Spark Performance by Tim Ellison.J On The Beach
Apache Spark has rocked the big data landscape, quickly becoming the largest open source big data community with over 750 contributors from more than 200 organizations. Spark's core tenants of speed, ease of use, and its unified programming model fit neatly with the high performance, scalable, and manageable characteristics of modern Java runtimes. In this talk we introduce the Spark programming model, and describe some unique Java runtime capabilities in the JIT, fast networking, serialization techniques, and GPU off-loading that deliver the ultimate big data platform for solving business problems. We will show how solutions, previously infeasible with regular Java programming, become possible with a high performance Spark core runtime, enabling you to solve problems smarter and faster.
Apache Spark has rocked the big data landscape, becoming the largest open source big data community with over 750 contributors from more than 200 organizations. Spark's core tenants of speed, ease of use, and its unified programming model fit neatly with the high performance, scalable, and manageable characteristics of modern Java runtimes. In this talk Tim Ellison, a JVM developer at IBM, shows some of the unique Java 8 capabilities in the JIT compiler, fast networking, serialization techniques, and GPU off-loading that deliver the ultimate big data platform for solving business problems. Tim will demonstrate how solutions, previously infeasible with regular Java programming, become possible with this high performance Spark core runtime, enabling you to solve problems smarter and faster.
Five cool ways the JVM can run Apache Spark fasterTim Ellison
The IBM JVM runs Apache Spark fast! This talk explains some of the findings and optimizations from our experience of running Spark workloads.
The talk was originally presented at the SparkEU Summit 2015 in Amsterdam.
A technical presentation on how Zing changes parts of the JVM to eliminate GC pauses, generate more heavily optimised code from the JIT and reduce the warm up time.
Microservices is the dominant architecture for developing new applications, as it is ideally suited to cloud deployments. When using JVM-based services, each instance works in isolation and has no awareness of previous runs of a service. The Cloud Native Compiler detaches the JIT compiler from individual JVMs and centralises it in the cloud, effectively a JIT-as-a-Service. The benefits of this are caching of compiled code for instant reuse, use of greater resources for higher optimisation as well as many others. The session will discuss the challenges of cloud-based JVMs and how we can significantly improve performance with reduced costs.
Code examples are available here: https://github.com/ivailo-pashov/jvmmagic
How well do you know what is going inside the JVM? How about its secret backdoors and nasty hacks? Initially they appear as magic tricks but being aware what is going on behind the scenes will save your time when real issues arise.
The Performance Engineer's Guide To HotSpot Just-in-Time CompilationMonica Beckwith
Adaptive compilation and runtime in the OpenJDK Hotspot VM offers significant performance enhancements for our tools and applications in Java and other JVM languages. Understanding how it works provides developers with critical information on the Java HotSpot JIT compilation and runtime techniques such as vectorization, compressed OOPs etc., to assist in understanding performance for both client and server applications. We will focus on the internals of OpenJDK 8, the reference implementation for Java SE 8.
Building a SIMD Supported Vectorized Native Engine for Spark SQLDatabricks
Spark SQL works very well with structured row-based data. Vectorized reader and writer for parquet/orc can make I/O much faster. It also used WholeStageCodeGen to improve the performance by Java JIT code. However Java JIT is usually not working very well on utilizing latest SIMD instructions under complicated queries. Apache Arrow provides columnar in-memory layout and SIMD optimized kernels as well as a LLVM based SQL engine Gandiva. These native based libraries can accelerate Spark SQL by reduce the CPU usage for both I/O and execution.
A Java Implementer's Guide to Better Apache Spark PerformanceTim Ellison
Apache Spark has rocked the big data landscape, becoming the largest open source big data community with over 750 contributors from more than 200 organizations. Spark's core tenants of speed, ease of use, and its unified programming model fit neatly with the high performance, scalable, and manageable characteristics of modern Java runtimes. In this talk we introduce the Spark programming model, and describe some of our unique Java 8 capabilities in the JIT, fast networking, serialization techniques, and GPU off-loading that deliver the ultimate big data platform for solving business problems. We will demonstrate how solutions, previously infeasible with regular Java programming, become possible with our high performance Spark core runtime, enabling you to solve problems smarter and faster.
Presented at Jfokus Feb 2016
Software Profiling: Understanding Java Performance and how to profile in JavaIsuru Perera
Guest lecture at University of Colombo School of Computing on 27th May 2017
Covers following topics:
Software Profiling
Measuring Performance
Java Garbage Collection
Sampling vs Instrumentation
Java Profilers. Java Flight Recorder
Java Just-in-Time (JIT) compilation
Flame Graphs
Linux Profiling
Similar to Владимир Иванов. JIT для Java разработчиков (20)
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
The European Union Agency for Law Enforcement Cooperation (Europol) has suffered an alleged data breach after a notorious threat actor claimed to have exfiltrated data from its systems. Infamous data leaker IntelBroker posted on the even more infamous BreachForums hacking forum, saying that Europol suffered a data breach this month.
The alleged breach affected Europol agencies CCSE, EC3, Europol Platform for Experts, Law Enforcement Forum, and SIRIUS. Infiltration of these entities can disrupt ongoing investigations and compromise sensitive intelligence shared among international law enforcement agencies.
However, this is neither the first nor the last activity of IntekBroker. We have compiled for you what happened in the last few days. To track such hacker activities on dark web sources like hacker forums, private Telegram channels, and other hidden platforms where cyber threats often originate, you can check SOCRadar’s Dark Web News.
Stay Informed on Threat Actors’ Activity on the Dark Web with SOCRadar!
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Accelerate Enterprise Software Engineering with PlatformlessWSO2
Key takeaways:
Challenges of building platforms and the benefits of platformless.
Key principles of platformless, including API-first, cloud-native middleware, platform engineering, and developer experience.
How Choreo enables the platformless experience.
How key concepts like application architecture, domain-driven design, zero trust, and cell-based architecture are inherently a part of Choreo.
Demo of an end-to-end app built and deployed on Choreo.
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
Les Buildpacks existent depuis plus de 10 ans ! D’abord, ils étaient utilisés pour détecter et construire une application avant de la déployer sur certains PaaS. Ensuite, nous avons pu créer des images Docker (OCI) avec leur dernière génération, les Cloud Native Buildpacks (CNCF en incubation). Sont-ils une bonne alternative au Dockerfile ? Que sont les buildpacks Paketo ? Quelles communautés les soutiennent et comment ?
Venez le découvrir lors de cette session ignite
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
Keep tabs on your field staff effortlessly with Informap Technology Centre LLC. Real-time tracking, task assignment, and smart features for efficient management. Request a live demo today!
For more details, visit us : https://informapuae.com/field-staff-tracking/
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
2. 2
Agenda
§ about compilers in general
– … and JIT-compilers in particular
§ about JIT-compilers in HotSpot JVM
§ monitoring JIT-compilers in HotSpot JVM
4. 4
Dynamic and Static Compilation
§ Static compilation
– “Ahead-Of-Time”(AOT) compilation
– Source code → Native executable
– Most of compilation work happens before executing
Comparison
5. 5
Dynamic and Static Compilation
§ Static compilation
– “Ahead-Of-Time”(AOT) compilation
– Source code → Native executable
– Most of compilation work happens before executing
§ Modern Java VMs use dynamic compilers (JIT)
– “Just-In-Time” (JIT) compilation
– Source code → Bytecode → Interpreter + JITted executable
– Most of compilation work happens during application execution
Comparison
6. 6
Dynamic and Static Compilation
§ Static compilation (AOT)
– can utilize complex and heavy analyses and optimizations
Comparison
7. 7
Dynamic and Static Compilation
§ Static compilation (AOT)
– can utilize complex and heavy analyses and optimizations
§ … but static information sometimes isn’t enough
§ … and it’s hard to guess actual application behavior
Comparison
8. 8
Dynamic and Static Compilation
§ Static compilation (AOT)
– can utilize complex and heavy analyses and optimizations
§ … but static information sometimes isn’t enough
§ … and it’s hard to guess actual application behavior
– moreover, how to utilize specific platform features?
§ like SSE4.2 / AVX / AVX 2, TSX, AES-NI, RdRand
Comparison
9. 9
Dynamic and Static Compilation
§ Modern Java VMs use dynamic compilers (JIT)
– aggressive optimistic optimizations
§ through extensive usage of profiling data
Comparison
10. 10
Dynamic and Static Compilation
§ Modern Java VMs use dynamic compilers (JIT)
– aggressive optimistic optimizations
§ through extensive usage of profiling data
§ … but resources are limited and shared with an application
Comparison
11. 11
Dynamic and Static Compilation
§ Modern Java VMs use dynamic compilers (JIT)
– aggressive optimistic optimizations
§ through extensive usage of profiling data
§ … but resources are limited and shared with an application
– thus:
§ startup speed suffers
§ peak performance may suffer as well (but not necessarily)
Comparison
12. 12
Dynamic and Static Compilation
§ Modern Java VMs use dynamic compilers (JIT)
– aggressive optimistic optimizations
§ through extensive usage of profiling data
§ … but resources are limited and shared with an application
– thus:
§ startup speed suffers
§ peak performance may suffer as well (but not necessarily)
Comparison
13. 13
Profiling
§ Gathers data about code during execution
– invariants
§ types, constants (e.g. null pointers)
– statistics
§ branches, calls
§ Gathered data can be used during optimization
– Educated guess
– Guess can be wrong
14. 14
Optimistic Compilers
§ Assume profile is accurate
– Aggressively optimize based on profile
– Bail out if they’re wrong
§ ...and hope that they’re usually right
15. 15
Profile-guided optimizations (PGO)
§ Use profile for more efficient optimization
§ PGO in JVMs
– Always have it, turned on by default
– Developers (usually) not interested or concerned about it
– Profile is always consistent to execution scenario
16. 16
Optimistic Compilers
public void f() {
A a;
if (cond /*always true*/) {
a = new B();
} else {
a = new C(); // never executed
}
a.m(); // exact type of a is either B or C
}
Example
17. 17
Optimistic Compilers
public void f() {
A a;
if (cond /*always true*/) {
a = new B();
} else {
toInterpreter(); // switch to interpreter
}
a.m(); // exact type of a is B
}
Example
19. 19
Dynamic Compilation (JIT)
§ Can do non-conservative optimizations in dynamic
§ Separates optimization from product delivery cycle
– Update JVM, run the same application, realize improved performance!
– Can be "tuned" to the target platform
20. 20
Dynamic Compilation (JIT)
§ Knows a lot about Java program
– loaded classes, executed methods, profiling
§ Makes optimization based on that
§ May re-optimize if previous assumption was wrong
21. 21
JVM
§ Runtime
– class loading, bytecode verification, synchronization
§ JIT
– profiling, compilation plans
– aggressive optimizations
§ GC
– different algorithms: throughput vs response time vs footprint
22. 22
JVM: Makes Bytecodes Fast
§ JVMs eventually JIT-compile bytecodes
– To make them fast
– compiled when needed
§ Maybe immediately before execution
§ ...or when we decide it’s important
§ ...or never?
– Some JITs are high quality optimizing compilers
23. 23
JVM: Makes Bytecodes Fast
§ JVMs eventually JIT-compile bytecodes
§ But cannot use existing static compilers directly
– different cost model
§ time & resource constraints (CPU, memory)
– tracking OOPs (ptrs) for GC
– Java Memory Model (volatile reordering & fences)
– New code patterns to optimize
24. 24
JVM: Makes Bytecodes Fast
§ JIT'ing requires Profiling
– Because you don't want to JIT everything
§ Profiling allows focused code-gen
§ Profiling allows better code-gen
– Inline what’s hot
– Loop unrolling, range-check elimination, etc
– Branch prediction, spill-code-gen, scheduling
25. 25
Dynamic Compilation (JIT)
§ Is dynamic compilation overhead essential?
– The longer your application runs, the less the overhead
§ Trading off compilation time, not application time
– Steal some cycles very early in execution
– Done automagically and transparently to application
§ Most of “perceived” overhead is compiler waiting for more data
– ...thus running semi-optimal code for time being
Overhead
33. 33
OSR: On-Stack Replacement
§ Running method never exits?
§ But it’s getting really hot?
§ Generally means loops, back-branching
§ Compile and replace while running
§ Not typically useful in large systems
§ Looks great on benchmarks!
35. 35
Optimizations in HotSpot JVM
§ compiler tactics
delayed compilation
tiered compilation
on-stack replacement
delayed reoptimization
program dependence graph rep.
static single assignment rep.
§ proof-based techniques
exact type inference
memory value inference
memory value tracking
constant folding
reassociation
operator strength reduction
null check elimination
type test strength reduction
type test elimination
algebraic simplification
common subexpression elimination
integer range typing
§ flow-sensitive rewrites
conditional constant propagation
dominating test detection
flow-carried type narrowing
dead code elimination
§ language-specific techniques
class hierarchy analysis
devirtualization
symbolic constant propagation
autobox elimination
escape analysis
lock elision
lock fusion
de-reflection
§ speculative (profile-based) techniques
optimistic nullness assertions
optimistic type assertions
optimistic type strengthening
optimistic array length strengthening
untaken branch pruning
optimistic N-morphic inlining
branch frequency prediction
call frequency prediction
§ memory and placement transformation
expression hoisting
expression sinking
redundant store elimination
adjacent store fusion
card-mark elimination
merge-point splitting
§ loop transformations
loop unrolling
loop peeling
safepoint elimination
iteration range splitting
range check elimination
loop vectorization
§ global code shaping
inlining (graph integration)
global code motion
heat-based code layout
switch balancing
throw inlining
§ control flow graph transformation
local code scheduling
local code bundling
delay slot filling
graph-coloring register allocation
linear scan register allocation
live range splitting
copy coalescing
constant splitting
copy removal
address mode matching
instruction peepholing
DFA-based code generator
36. 36
JVM: Makes Virtual Calls Fast
§ C++ avoids virtual calls
– … because they are slow
37. 37
JVM: Makes Virtual Calls Fast
§ C++ avoids virtual calls
§ Java embraces them
– … and makes them fast
38. 38
JVM: Makes Virtual Calls Fast
§ C++ avoids virtual calls
§ Java embraces them
– Well, mostly fast – JIT's do Class Hierarchy Analysis (CHA)
– CHA turns most virtual calls into static calls
– JVM detects new classes loaded, adjusts CHA
§ May need to re-JIT
– When CHA fails to make the call static, inline caches
– When IC's fail, virtual calls are back to being slow
39. 39
Inlining
§ Combine caller and callee into one unit
– e.g. based on profile
– … or proved using CHA (Class Hierarchy Analysis)
– Perhaps with a guard/test
§ Optimize as a whole (single compilation unit)
– More code means better visibility
42. 42
Inlining and devirtualization
§ Inlining is the most profitable compiler optimization
– Rather straightforward to implement
– Huge benefits: expands the scope for other optimizations
§ OOP needs polymorphism, that implies virtual calls
– Prevents naïve inlining
– Devirtualization is required
– (This does not mean you should not write OOP code)
43. 43
Call Site
§ The place where you make a call
§ Types
– Monomorphic (“one shape”)
§ Single target class
– Bimorphic (“two shapes”)
– Polymorphic (“many shapes”)
– Megamorphic
44. 44
Devirtualization in JVM
§ Analyzes hierarchy of currently loaded classes
§ Efficiently devirtualizes all monomorphic calls
§ Able to devirtualize polymorphic calls
§ JVM may inline dynamic methods
– Reflection calls
– Runtime-synthesized methods
– JSR 292
45. 45
Feedback multiplies optimizations
§ Profiling and CHA produces information
– ...which lets the JIT ignore unused paths
– ...and helps the JIT sharpen types on hot paths
– ...which allows calls to be devirtualized
– ...allowing them to be inlined
– ...expanding an ever-widening optimization horizon
§ Result:
Large native methods containing tightly optimized machine code for
hundreds of inlined calls!
54. 54
Monitoring JIT-Compiler
§ how to print info about compiled methods?
– -XX:+PrintCompilation
§ how to print info about inlining decisions
– -XX:+PrintInlining
§ how to control compilation policy?
– -XX:CompileCommand=…
§ how to print assembly code?
– -XX:+PrintAssembly
– -XX:+PrintOptoAssembly (C2-only)
57. 57
Print Compilation
§ 2043 470 % ! jdk.nashorn.internal.ir.FunctionNode::accept @ 136 (265 bytes)
% == OSR compilation
! == has exception handles (may be expensive)
s == synchronized method
§ 2028 466 n java.lang.Class::isArray (native)
n == native method
Other useful info
58. 58
Print Compilation
§ 621 160 java.lang.Object::equals (11 bytes) made not entrant
– don‘t allow any new calls into this compiled version
§ 1807 160 java.lang.Object::equals (11 bytes) made zombie
– can safely throw away compiled version
Not just compilation notifications
59. 59
No JIT At All?
§ Code is too large
§ Code isn’t too «hot»
– executed not too often
63. 63
Intrinsic
§ Known to the JIT compiler
– method bytecode is ignored
– inserts “best” native code
§ e.g. optimized sqrt in machine code
§ Existing intrinsics
– String::equals, Math::*, System::arraycopy, Object::hashCode,
Object::getClass, sun.misc.Unsafe::*
64. 64
Inlining Tuning
§ -XX:MaxInlineSize=35
– Largest inlinable method (bytecode)
§ -XX:InlineSmallCode=#
– Largest inlinable compiled method
§ -XX:FreqInlineSize=#
– Largest frequently-called method…
§ -XX:MaxInlineLevel=9
– How deep does the rabbit hole go?
§ -XX:MaxRecursiveInlineLevel=#
– recursive inlining
65. 65
Machine Code
§ -XX:+PrintAssembly
– http://wikis.sun.com/display/HotSpotInternals/PrintAssembly
§ Knowing code compiles is good
§ Knowing code inlines is better
§ Seeing the actual assembly is best!