jvm

Guess method line number from JVM fatal error log

允我心安 提交于 2021-02-16 06:59:35
问题 I have a fatal error log without a core-dump and need to identify the cause. This is the stack found in the .log file: # Problematic frame: # C [libc.so.6+0x7b4bb] memcpy+0x15b {...} Stack: [0x00002ac8c4d2c000,0x00002ac8c4e2d000], sp=0x00002ac8c4e28ef8, free space=1011k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libc.so.6+0x7b4bb] memcpy+0x15b C [libzip.so+0x50b0] ZIP_GetEntry+0xd0 C [libzip.so+0x3eed] Java_java_util_zip_ZipFile_getEntry+0xad J 28 java

Guess method line number from JVM fatal error log

北城以北 提交于 2021-02-16 06:59:08
问题 I have a fatal error log without a core-dump and need to identify the cause. This is the stack found in the .log file: # Problematic frame: # C [libc.so.6+0x7b4bb] memcpy+0x15b {...} Stack: [0x00002ac8c4d2c000,0x00002ac8c4e2d000], sp=0x00002ac8c4e28ef8, free space=1011k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libc.so.6+0x7b4bb] memcpy+0x15b C [libzip.so+0x50b0] ZIP_GetEntry+0xd0 C [libzip.so+0x3eed] Java_java_util_zip_ZipFile_getEntry+0xad J 28 java

JVM GC参数以及GC算法的应用

萝らか妹 提交于 2021-02-13 07:42:38
之前一篇 Blog 已经将GC的机制以及GC的算法讲了一下。 而这篇Blog主要是讨论这些GC的算法在JVM中的不同应用。 1. 串行收集器 串行收集器是 最古老,最稳定以及 效率高的收集器 可能会产生较长的停顿, 只使用一个线程去回收 -XX:+UseSerialGC 新生代、老年代使用串行回收 新生代复制算法 老年代标记-压缩 串行收集器的日志输出: 0.844: [GC 0.844: [DefNew: 17472K->2176K(19648K), 0.0188339 secs] 17472K->2375K(63360K), 0.0189186 secs] [Times: user=0.01 sys=0.00, real=0.02 secs] 8.259: [Full GC 8.259: [Tenured: 43711K->40302K(43712K), 0.2960477 secs] 63350K->40302K(63360K), [Perm : 17836K->17836K(32768K)], 0.2961554 secs] [Times: user=0.28 sys=0.02, real=0.30 secs] 2. 并行收集器 2.1 ParNew -XX:+UseParNewGC(new代表新生代,所以适用于新生代) 新生代并行 老年代串行

Java早期(编译期)优化

半世苍凉 提交于 2021-02-12 11:17:15
Java早期(编译期)优化 1. Javac编译器 1.1 编译步骤 编译过程可分为3个步骤: 解析与填充符号过程 插入式注解处理器的注解处理过程 分析与字节码生成过程 1.2 解析与填充符号表 解析步骤包含了词法分析和语法分析两个过程。 1.2.1 词法、语法分析 词法分析 是将源代码的字符流转变为标记(Token)集合,标记是编译过程的最小元素。 语法分析 是根据Token序列构建抽象语法树的过程。 抽象语法树 是一种用来描述程序代码语法结构的树形表示方式,语法树中的每一个节点都代表着程序代码中的一个语法结构,例如包、类型、修饰符、运算符、接口等。 1.2.2 填充符号表 符号表是由一组符号地址和符号信息构成的表格。符号表中登记的信息在编译的不同阶段都要用到。在语义分析中,符号表所登记的内容将用于语义检查和产生中间代码。在目标代码生成阶段,当对符号名进行地址分配时,符号表是地址分配的依据。 1.3 注解处理器 JDK1.6之中提供了一组插入式注解处理器的标准API在编译期间对注解进行处理,可以把它看做是一组编译器插件,在这些插件中,可以读取、修改、添加抽象语法树中的任意元素。若这些插件在处理注解期间对语法树进行了修改,编译器将回到解析及填充符号表的过程重新处理,直到所有插入式注解处理器都没有再对语法树进行修改为止,每一次循环称为一个Round。 1.4 语义分析与字节码生成

jemalloc generating many files

痴心易碎 提交于 2021-02-11 13:50:21
问题 I followed the jemalloc instructions and setup the jemalloc on centOS 7. However, soon after setting export LD_PRELOAD=/usr/local/lib/libjemalloc.so export MALLOC_CONF=prof_leak:true,lg_prof_sample:50,lg_prof_interval:62,prof_final:true environment variables, I could see a lot of jeprof.*.heap files being written to my current directory. I didn't start my jetty server at all, still, so many files are generated. Which process is generating it? When I tried to start the application as follows

Is there a way to pass application specific properties in Websphere?

家住魔仙堡 提交于 2021-02-11 13:28:46
问题 We have a websphere application server where multiple applications are deployed. All applications use a common property(Key) but have different Value. For example : spring.profiles.active=test in one application, spring.profiles.active=UAT in some other application. Is it possible to pass these different values to the applications during start-up in Websphere ? If we set these values in JVM options in the Generic JVM Arguments text box then it will become same for all the applications which

Is there a way to pass application specific properties in Websphere?

家住魔仙堡 提交于 2021-02-11 13:28:19
问题 We have a websphere application server where multiple applications are deployed. All applications use a common property(Key) but have different Value. For example : spring.profiles.active=test in one application, spring.profiles.active=UAT in some other application. Is it possible to pass these different values to the applications during start-up in Websphere ? If we set these values in JVM options in the Generic JVM Arguments text box then it will become same for all the applications which

Does the Thread still exist if the JVM crashes?

别等时光非礼了梦想. 提交于 2021-02-10 20:34:57
问题 I was asked this question during an interview, does anybody know? 回答1: If JVM exits as a result of crash the thread will not exist anymore. If crash is some kind of out of memory or similar error, it may or may not exist depending on specific circumstances. 回答2: If a thread is running the JVM has not crashed. However, sometimes people incorrectly describe any exception being throw as a crash. If this is what the interviewer meant, I would say the thread is still running because the exception

Does the Thread still exist if the JVM crashes?

萝らか妹 提交于 2021-02-10 20:31:54
问题 I was asked this question during an interview, does anybody know? 回答1: If JVM exits as a result of crash the thread will not exist anymore. If crash is some kind of out of memory or similar error, it may or may not exist depending on specific circumstances. 回答2: If a thread is running the JVM has not crashed. However, sometimes people incorrectly describe any exception being throw as a crash. If this is what the interviewer meant, I would say the thread is still running because the exception

package org.apache.poi.ss.usermodel does not exist

痴心易碎 提交于 2021-02-10 17:47:03
问题 I tried to compile a java file using CMD but I got error of these. I have follow other solutions on stackoverflow but still not solved. C:\Users\User\eclipse-workspace\Calendar_v1\src\cal>javac ShiftSetting.java ShiftSetting.java:7: error: package org.apache.poi.ss.usermodel does not exist import org.apache.poi.ss.usermodel.Cell; ^ ShiftSetting.java:8: error: package org.apache.poi.ss.usermodel does not exist import org.apache.poi.ss.usermodel.DataFormatter; ^ ShiftSetting.java:9: error: