DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Trending

  • Web Crawling for RAG With Crawl4AI
  • Building a Real-Time Change Data Capture Pipeline With Debezium, Kafka, and PostgreSQL
  • Resolving Parameter Sensitivity With Parameter Sensitive Plan Optimization in SQL Server 2022
  • Security by Design: Building Full-Stack Applications With DevSecOps

Deoptimization

If you're ever seen the messages, 'made not entrant,' or 'made zombie,' while working in the JVM, read on to learn how to handle this situation.

By 
Grzegorz Mirek user avatar
Grzegorz Mirek
·
Aug. 03, 17 · Analysis
Likes (2)
Comment
Save
Tweet
Share
4.8K Views

Join the DZone community and get the full member experience.

Join For Free

When looking at the output of the -XX:+PrintCompilation JVM flag, it’s easy to spot some entries with “made not entrant” and “made zombie.” This indicates so called deoptimization. What it basically means is that the code which was previously compiled has to be backed out.

Not Entrant Code

Code can be made not entrant in the following scenarios:

  • When using a polymorphism.
  • During Tiered Compilation.

Polymorphism

Let’s look at an example:

Parser parser;

if (document.isLong()) {
  parser = new RemoteParser();
} else {
  parser = new LocalParser();
}

String parsedDocument = parser.parse(document);
// ...

As you can see, the implementation of the parser depends on the length of the document. If we want to parse a long document, we will use the RemoteParser, otherwise, it will be the LocalParser. Let’s imagine the following situation: there is a huge amount of long documents to be parsed; the JIT compiler will notice that the actual type of parser is the RemoteParser. It will use the inline parse method (if applicable) and perform further optimizations assuming that the type of parser is always the RemoteParser.

Now, let’s call the code above with a huge amount of short documents. The assumption about the type of parser is no longer valid, so the optimizations applied before are also invalid. That means that the compiled methods have been made not entrant. JVM will discard all those optimizations and start compiling that code with LocalParser.

Tiered Compilation

Due to the nature of Tiered Compilation, when the method is compiled using different levels of compilation, the code compiled using the previous level is made not entrant. What it basically means is that the compilation on a new level is made from scratch (however, it can use profile data that's already been collected).

Zombie Code

“Zombie code” in a compilation log means that the code which was previously made not entrant has been reclaimed. In other words – all the objects which used previous optimizations don’t exist anymore so that the optimized code can be removed from a code cache (where compiled code is held and which is limited, of course).

Published at DZone with permission of Grzegorz Mirek, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!