openj9 | Eclipse OpenJ9 : A Java Virtual Machine | Runtime Evironment library

 by   eclipse-openj9 Java Version: openj9-0.38.0 License: Non-SPDX

kandi X-RAY | openj9 Summary

kandi X-RAY | openj9 Summary

openj9 is a Java library typically used in Server, Runtime Evironment, Eclipse applications. openj9 has no bugs, it has no vulnerabilities and it has medium support. However openj9 build file is not available and it has a Non-SPDX License. You can download it from GitHub.

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              openj9 has a medium active ecosystem.
              It has 3113 star(s) with 676 fork(s). There are 150 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 2042 open issues and 5024 have been closed. On average issues are closed in 63 days. There are 203 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of openj9 is openj9-0.38.0

            kandi-Quality Quality

              openj9 has no bugs reported.

            kandi-Security Security

              openj9 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              openj9 has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              openj9 releases are available to install and integrate.
              openj9 has no build file. You will be need to create the build yourself to build the component from source.

            Top functions reviewed by kandi - BETA

            kandi has reviewed openj9 and discovered the below as its top functions. This is intended to give you an instant insight into openj9 implemented functionality, and help decide if they suit your requirements.
            • Returns the nominal type of this variable .
            • Appends the buffer to the given byte stream .
            • Determines all statistics for the current class .
            • dump a list of byte codes
            • Internal helper to perform the permission .
            • Create the constructors .
            • Find all the classloaders in the class loader .
            • Process an XML start XML element .
            • Init class .
            • Builds symbols for an image .
            Get all kandi verified functions for this library.

            openj9 Key Features

            No Key Features are available at this moment for openj9.

            openj9 Examples and Code Snippets

            No Code Snippets are available at this moment for openj9.

            Community Discussions

            QUESTION

            How to disable the spinlock for synchronization in OpenJDK
            Asked 2021-May-05 at 19:40
            Background

            I am analyzing a performance issue on a Java servlet running on AdoptOpenJDK 11. The response time of the servlet slows down as the number of concurrent requests increases.

            To isolate the cause of the issue, I had collected performance information with two tools while changing the number of concurrent requests:

            • Windows Performance Monitor (to inspect CPU usage of the server)
            • JDK Flight Recorder and JDK Mission Control (to inspect synchronization issue in JavaVM)
            Problem

            According to Mission Control, the servlet has a synchronization issue. It causes so many synchronization events when two or more requests come concurrently. The synchronization events are fired in a class used to lookup a table. The lookup table is implemented with ConcurrentHashMap. So the synchronization is not intentional and looks unnecessary.

            On the other hand, according to the Performance Monitor, the number of concurrent requests and the CPU usage % are almost linearly increase together. This is an unexpected result for me.

            I had expected that the CPU usage will become constant because the requests will be processed one by one due to the synchronization. As a result of more research, I have found the Java VM had introduced the Adaptive Spinning on Java 6, and I had set a hypothesis that this (spinlock for synchronization in Java VM) is the reason why the CPU usage increased linearly.

            Question

            The class that causes the synchronization issue is used in so many places in our application. To reasoning and explanation for the change to the class (remove the synchronized block from the class), I have to confirm the hypothesis with the result of a performance test. To confirm the hypothesis, I want to disable the spinlock for synchronization in Java VM.

            I have found the JRockit and OpenJ9 had the command-line option to change the behavior of the adaptive spinning. But I could not find the equivalent for OpenJDK. There were no options related to spinlock in the result of java -XX:+PrintFlagsFinal -version.

            Is there any way to disable the spinlock for synchronization in OpenJDK Java VM?

            ...

            ANSWER

            Answered 2021-May-05 at 19:40

            The question is actually an XY problem. I'll answer it with the caveat that the experiment might be useless or even misleading.

            The hypothesis that disabled spinning will decrease CPU usage is not necessary correct. Without spinning, a contended lock ends up in calling into OS kernel to park/unpark threads. A system call with a context switch is expensive, so, depending on the number of threads and the length of the critical section, this may actually increase CPU usage.

            The options to disable spinning on intrinsic locks in OpenJDK 11 are:

            Source https://stackoverflow.com/questions/67390113

            QUESTION

            How to view Android code after JIT optimization?
            Asked 2021-Apr-28 at 03:52

            I hope you are well.

            While programming, I came to wonder if my lazy (but pretty) code will eventually get optimized and I don't need to care about optimization or not. So I ran some searches and found out HotSpot or OpenJ9 are tools that I can use to compile java code into assembly and optimize it.

            So I thought, if I turned my example.kt code into example.class and run HotSpot or J9 on this example.class, I could view optimized code.

            I tried below, but it only produced an error code.

            ...

            ANSWER

            Answered 2021-Apr-28 at 03:52

            Hotspot and OpenJ9 will compile to assembly, the assembly code being assembly for the platform you are running them on, as your program is running, or beforehand. It will compile from class files to the native code on that platform.

            Since you cannot run Hotspot or J9 on Android, you cannot compile for Android this way.

            For Android, you use the Android ART compiler, which compiles in a multi-step process from class files to dex files and apk files outside the device, then on the Android device to native code.

            Source https://stackoverflow.com/questions/66828864

            QUESTION

            java -XX:+PrintCompilation doesn't show any compilation output
            Asked 2021-Apr-11 at 02:29

            I ran the following sample java class following some Java course material. In the beginning, I was able to see compilation output in the console. From some point, '-XX:+PrintCompilation' started NOT to show any compilation log output. Any idea?

            ...

            ANSWER

            Answered 2021-Apr-11 at 02:29

            -XX:+PrintCompilation is an option of the HotSpot JVM. You are using OpenJ9 VM though.

            To log JIT compilation in OpenJ9, use -Xjit:verbose

            Source https://stackoverflow.com/questions/67040861

            QUESTION

            Pointing Intellij SDK to jenv defined java home
            Asked 2021-Mar-31 at 20:53

            I am using jenv to set the java home. It works fine and points to the correct JAVA_HOME when I do echo $JAVA_HOME.

            My question is how do we set Intellij to get the SDK pointed by JAVA_HOME without having to go through the project SDK route.

            Output of:

            ...

            ANSWER

            Answered 2021-Mar-27 at 14:32

            You don't need any variables set up. The link you provided has the answer. When you click the + button use the path that you've posted here /Users/jetfire/.jenv/versions/ibm64-15.0.1

            I'm using sdkman so it's basically the same

            Source https://stackoverflow.com/questions/66827680

            QUESTION

            IBM JVM WebSphere Application Server what is the effect of -XX:+UseG1GC? Does -Xgcpolicy:gencon supersede?
            Asked 2021-Feb-03 at 14:58

            As per IBM link (https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/openj9/xgcpolicy/index.html), the gc policy can be specified by setting by -Xgcpolicy. Default gcpolicy is gencon (-Xgcpolicy:gencon). WAS is 9.0 and JVM is IBM J9 (Java version 1.8). Next, from the below link of IBM it seems that the setting of the gc algorithm is also possible using flag -XX, like in other JVM. E.g: -XX:+UseG1GC can work. https://www.ibm.com/support/knowledgecenter/en/SS3KLZ/com.ibm.java.diagnostics.visualizer.doc/verbosegc.html

            My intention is to apply the gc behavior like of UseG1GC. The heap size is -Xms16G to -Xmx20G. So, I wish to go for Garbase First and concurrent that is UseG1GC. The -Xgcpolicy:gencon also does somewhat similar but it cause the "stop the world". When gc is running the application gets suspension. Little confused that even if I set the -XX:+UseG1GC, will it follow and be effective to UseG1GC behavior or it will follow the mechanism of -Xgcpolicy:gencon? Or the gcpolicy and gc algorithm are two different things?

            ...

            ANSWER

            Answered 2021-Feb-03 at 14:58

            There is no effect of using -XX:+UseG1GC on IBM JVM. It will just be silently swallowed. The JVM will default to Gencon GC policy.

            You can verify that by running -verbose:gc, what will reported GC policy being used.

            The closest IBM's GC policy to Hotspot's G1GC is Balanced one, the main distinguishing characteristics being they are region based (unlike Gencon that has two distinct ares of heap for old and new objects).

            As far as concurrency, all 3 (G1GC, Balanced, Gencon) are similar: global GCs are mostly concurrent and partial/local GCs are STW (Stop-The-World).

            Reasons to use region based GC policy are to reduce worst case pause time. They are capable of doing some global type operations incrementally in partial GCs. Most notably, they can incrementally de-fragment heap, unlike Gencon, that it does in global GC via optional STW compact operation. Most of applications will not require such global compact, hence Gencon is default. But, if long pauses due to global compaction are observed in Gencon run, Balanced should be tried. Balanced GC will however slightly compromise the application throughput.

            Source https://stackoverflow.com/questions/66021408

            QUESTION

            Is it possible to write a Java program which executes the FMOV instruction in an AArch64 computer?
            Asked 2020-Dec-27 at 04:00

            According to the "Arm Architecture Reference Manual Armv8, for Armv8-A architecture profile", there is an instruction FMOV (scalar, immediate). It is stated that "This instruction copies a floating-point immediate constant into the SIMD & FP destination register".

            Is it possible to write a simple Java program that executes this instruction in an AArch64 machine? Also, how can I verify that the written program executes a particular instruction? Thanks.

            PS1: I'm using Eclipse OpenJ9 VM (https://www.eclipse.org/openj9).
            PS2: As javap is based on bytecode, it's not what I'm looking for. I also tried below commands, but was unable to verify the instruction execution-

            ...

            ANSWER

            Answered 2020-Aug-16 at 08:13

            Reading the armv8 spec:

            The Floating-point move (register) instructions copy a scalar floating-point value from one register to another register without performing any conversion. Some of the Floating-point move (register) instructions overlap with the functionality provided by the Advanced SIMD instructions DUP , INS , and UMOV . However, Arm recommends using the FMOV instructions when operating on scalar floating-point data to avoid the creation of scalar floating-point code that depends on the availability of the Advanced SIMD instruction set. Table C3-64 shows the Floating-point move (register) instructions.

            The spec suggests that this instruction is the only way to move from a floating point register to a general purpose register, if the listed SIMD instructions aren't available. So you need java code that converts a float to an int without performing a conversion, and a processor that doesn't have SIMD support.

            The defacto way to do this in java seems to be Float.floatToIntBits.

            On my JVM install(hotspot jdk8u forest) this is implemented as a native function. This native function eventually reaches hotspot/src/share/vm/opto/library_call.cpp, with the following code:

            Source https://stackoverflow.com/questions/63401347

            QUESTION

            bootstrap.yml configuration not processed anymore with Spring Cloud 2020.0
            Asked 2020-Dec-25 at 04:28

            In my Spring Boot project, I defined 4 profiles

            1. demo
            2. dev
            3. test
            4. prod

            properties in YAML files will be replaced by HashiCorp Vault properties during startup. For this, I use Spring Cloud Vault library. Everything works as expected in Spring Boot 2.3.x

            When I try to upgrade the project to Spring Boot 2.4.0 with Spring Cloud Vault 3.0.0-SNAPSHOT version, the properties are not being replaced

            bootstrap.yml

            ...

            ANSWER

            Answered 2020-Nov-30 at 18:57

            As pointed put by Nicoll, With Spring Cloud Vault 3.0 and Spring Boot 2.4, the bootstrap context initialization (bootstrap.yml, bootstrap.properties) of property sources was deprecated. This can be fixed in one of the 2 ways

            1. Use Spring Boot 2.4.0 Config Data API to import configuration from Vault
            2. Enable the bootstrap context either by setting the configuration property spring.cloud.bootstrap.enabled=true or by including the dependency org.springframework.cloud:spring-cloud-starter-bootstrap

            1. Use Spring Boot 2.4.0 Config Data API

            Move bootstrap.yml configuration to application.yml and define spring.config.import to import all profiles. And it looks like below

            Source https://stackoverflow.com/questions/64994034

            QUESTION

            How does Java Handle Endianess when running on Little Endian CPU Architectures?
            Asked 2020-Dec-21 at 08:22

            Java being Big Endian how does it handle Little Endian CPUs while maintaining performance? Does JVM (OpenJDK, OpenJ9, etc.) do any special optimisations to maintain performance like only selectively being Big Endian in special situation in Little Endian platforms? Is there special endianess handling when accessing ByteBuffers or calling native code or writing to IO or accessing volatile variables? How does Java change the endianess in Little Endian architectures? At what point or operation (load, store, calculation, registers, cache, memory, etc.) is the endianess changed? What kind of performance penalty would this have?

            ...

            ANSWER

            Answered 2020-Dec-21 at 08:22

            Java being Big Endian how does it handle Little Endian CPUs while maintaining performance?

            Java is not Big Endian. In the few places in the Java Runtime Library where Endianness is even an issue, the API uses Big Endian, but it is always well-documented, and some of the APIs allow you to specify the Endianness you want.

            Does JVM (OpenJDK, OpenJ9, etc.) do any special optimisations to maintain performance like only selectively being Big Endian in special situation in Little Endian platforms?

            No, the JVM uses the native Endianness.

            Is there special endianess handling when accessing ByteBuffers or calling native code or writing to IO or accessing volatile variables?

            Yes, No, Yes, and No.

            Since the JVM uses native byte order, there is no handling needed for calling native code or accessing volatile variables. Byte order only matters when (de)serializing to/from bytes, e.g. when accessing ByteBuffers or writing to IO.

            How does Java change the endianess in Little Endian architectures?

            Same way you would change Endianness anywhere, it swaps the bytes, or read/writes the bytes in the appropriate order.

            At what point or operation (load, store, calculation, registers, cache, memory, etc.) is the endianess changed?

            It's not, since the JVM uses the native Endianness. Endianness is only applied when the native value is converted to/from bytes. At no other point in time does Endianness matter.

            What kind of performance penalty would this have?

            None, since it doesn't do anything.

            Source https://stackoverflow.com/questions/65389086

            QUESTION

            JProfiler doesn't detect running AdoptOpenJDK 11 openJ9
            Asked 2020-Oct-15 at 14:52

            I'm trying to profile a Java app running with AdoptOpenJDK 11 version OpenJ9. My problem is that, when I try to attach JProfiler on my app, it doesn't detect the running instance. I'm using the last version of JProfiler (11.1.4). Is it compatible with this JRE? Is there something to do/configure to make it working?

            Best regards

            ...

            ANSWER

            Answered 2020-Oct-15 at 14:52

            As of JProfiler 11.0, attach mode is not supported for OpenJ9 JVMs. Also, attach mode is not enabled by default for OpenJ9.

            When passing the -agentpath VM parameter as given by the integration wizards, profiling OpenJ9 JVMs is fully supported.

            Source https://stackoverflow.com/questions/64369339

            QUESTION

            Clean javac output on Windows for Vim, maybe via Unix (Cygwin) tools
            Asked 2020-Sep-19 at 17:00

            I am new to Java, and installed the following JDK on Windows 10:

            ...

            ANSWER

            Answered 2020-Sep-19 at 17:00

            Bottom line up front

            The following Bash command sends both stdout and stderr from javac to both the screen and the file mk.out:

            Source https://stackoverflow.com/questions/63755495

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install openj9

            You can download it from GitHub.
            You can use openj9 like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the openj9 component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            Since we are an Eclipse Foundation project, each contributor needs to sign an Eclipse Contributor Agreement. The Eclipse Foundation operates under the [Eclipse Code of Conduct][coc] to promote fairness, openness, and inclusion. To get started, read our [Contribution Guide](CONTRIBUTING.md). If you think you want to contribute but you’re not ready to sign the Eclipse Contributor Agreement, why not come along to our weekly Ask the OpenJ9 community calls to find out more about how we work. We talk about new ideas, answer any questions that get raised, and discuss project plans and status. We also do lightning talks on features and functions of the VM. Visit the #planning channel in our [Slack workspace](https://openj9.slack.com/) for information about upcoming community calls and minutes from previous meetings (Join [here](https://join.slack.com/t/openj9/shared_invite/enQtNDU4MDI4Mjk0MTk2LWVhNTMzMGY1N2JkODQ1OWE0NTNmZjM4ZDcxOTBiMjk3NGFjM2U0ZDNhMmY0MDZlNzU0ZjAyNzQ1ODlmYjg3MjA)).
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link