[JAVA] I tried the new feature profiler of IntelliJ IDEA 2019.2.

New features of IntelliJ IDEA 2019 \ .2 \ | Samuraism Co., Ltd.

This new feature is gorgeous!

I often improve performance, but IntelliJ IDEA also has a profiling tool, so I tried using it. It seemed convenient, so it looks like this will be the main weapon in the future.

Assumptions: Ubuntu 19.04, Scala (can also be Java)

Setting method

Press + as shown below to add a set of profilers and press OK Screenshot from 2019-07-27 10-01-05.png

Then, there are more menus when executing, so for the time being, try pressing Run'somehow' with'Profiler' Screenshot from 2019-07-27 10-34-46.png

↓ modal will come out, so Screenshot from 2019-07-27 10-00-11.png As instructed

sudo sh -c 'echo 1 > /proc/sys/kernel/perf_event_paranoid'
sudo sh -c 'echo 0 > /proc/sys/kernel/kptr_restrict'

Execute. Upon examination, this setting seems to be necessary for collecting and analyzing information about kernel performance. If it is not Linux, it may not be necessary or another setting method may come out.

↓ Related article Chapter 52 Compilers and Tools -Red Hat Customer Portal Enable Linux \ * Kernel Analysis

I tried to profile

Frame Graph tab

Hmmm, maybe I don't use it much Screenshot from 2019-07-27 10-08-52.png

Call Tree It became a tree and came out with% each. If you profile with VisualVM, you will get something like this. The blue number to the right of% seems to be the number of folded cases. Screenshot from 2019-07-27 10-11-19.png Method List It is now sorted in the order in which it was sampled. You can select the Back Trace tab and the Merged Callees tab from the selected method. The Back Trace tab allows you to trace where it was called. Screenshot from 2019-07-27 10-52-35.png

The Merged Callees tab looks like a method called within that method. Screenshot from 2019-07-27 10-53-19.png

I also tried using Java Flight Recorder

There are various things such as GC logs and the number of weak references. Screenshot from 2019-07-27 10-25-58.png

Recommended Posts

I tried the new feature profiler of IntelliJ IDEA 2019.2.
I tried using the profiler of IntelliJ IDEA
I tried the new era in Java
I tried the AutoValue library in Intellij
I touched on the new features of Java 15
The idea of quicksort
The idea of jQuery
I tried using the Server Push function of Servlet 4.0
05. I tried to stub the source of Spring Boot
I tried to reduce the capacity of Spring Boot
I tried installing the Docker Integration plugin in IntelliJ
[WIP] I tried the configuration of Docker + Streama + NFS
A memorandum because I was addicted to the setting of the Android project of IntelliJ IDEA
I tried the Docker tutorial!
I tried the VueJS tutorial!
I tried the FizzBuzz problem
[Swift] I tried to implement the function of the vending machine
I tried JAX-RS and made a note of the procedure
I tried to summarize the basic grammar of Ruby briefly
I tried to build the environment of WSL2 + Docker + VSCode
I tried to make the sample application into a microservice according to the idea of the book "Microservice Architecture".
I tried to solve the problem of "multi-stage selection" with Ruby
I read the source of ArrayList I read
I tried to build the environment of PlantUML Server with Docker
I tried the input / output type of Java Lambda ~ Map edition ~
I tried using the cache function of Application Container Cloud Service
I read the source of Integer
I tried to explain the method
I read the source of Long
I tried the Java framework "Quarkus"
[Rails] I tried deleting the application
I tried to check the operation of gRPC server with grpcurl
I tried to summarize the methods of Java String and StringBuilder
I read the source of Short
I read the source of Byte
I read the source of String
I tried to solve the problem of Google Tech Dev Guide
I tried using GoogleHttpClient of Java
I tried to summarize the key points of gRPC design and development
I tried lightly the result cache of the method of JCache (Ehcache 3) feat. Guice
I tried to make full use of the CPU core in Ruby
I tried to visualize the access of Lambda → Athena with AWS X-Ray
I tried to measure and compare the speed of GraalVM with JMH
I investigated the internal processing of Retrofit
[day: 5] I summarized the basics of Java
It's new, but I tried using Groonga
I tried to implement the Iterator pattern
I made a plugin for IntelliJ IDEA
I tried to summarize the Stream API
What I tried when I wanted to get all the fields of a bean
I tried to compare the infrastructure technology of engineers these days with cooking.
[Beginner] I tried to decorate the bar after displaying the details of the hamburger menu
I tried using Docker for the first time
I want to output the day of the week
I checked the place of concern of java.net.URL # getPath
[Rails] I tried to raise the Rails version from 5.0 to 5.2
I tried to organize the session in Rails
I understood the very basics of character input
I compared the characteristics of Java and .NET
I tried to chew C # (basic of encapsulation)
I want to var_dump the contents of the intent