最新消息:深度思考

Conflicting collector combinations in option list

Java liuxuecheng 6485浏览 0评论

版权申明:转载请注明出处。
文章来源:大数据随笔

最近在对一个项目的jvm参数进行优化的时候发现配置完以后项目无法启动,打印了日志看到如下提示:

Conflicting collector combinations in option list;
please refer to the release notes for the combinations allowed

从字面意思来看是垃圾回收器冲突了,研究之后发现jvm的源码中有如下逻辑:

bool Arguments::check_gc_consistency() {  
  bool status = true;  
  // Ensure that the user has not selected conflicting sets  
  // of collectors. [Note: this check is merely a user convenience;  
  // collectors over-ride each other so that only a non-conflicting  
  // set is selected; however what the user gets is not what they  
  // may have expected from the combination they asked for. It's  
  // better to reduce user confusion by not allowing them to  
  // select conflicting combinations.  
  uint i = 0;  
  if (UseSerialGC)                       i++;  
  if (UseConcMarkSweepGC || UseParNewGC) i++;  
  if (UseParallelGC || UseParallelOldGC) i++;  
  if (UseG1GC)                           i++;  
  if (i > 1) {  
    jio_fprintf(defaultStream::error_stream(),  
                "Conflicting collector combinations in option list; "  
                "please refer to the release notes for the combinations "  
                "allowed\n");  
    status = false;  
  }  

  return status;  
}  

记录一下,以便以后参考。

转载请注明:大数据随笔 » Conflicting collector combinations in option list

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址