第2节课作业实践.docx
《第2节课作业实践.docx》由会员分享,可在线阅读,更多相关《第2节课作业实践.docx(4页珍藏版)》请在优知文库上搜索。
1、第2节课作业实践工、本机使用GlGC启动一个程序,仿照课上案例分析一下JVM情况实践使用我之前写的一个WaiterSerViCeAPPliCatiOn进行演示,这是一个RestService,用于处理咖啡的订单。1 .在IDEA上将此project的VMoptions设置为:-XX:+USeGIGC-XX:MaXGCPaUSeMiIIiS=50ffiRufVDebugConfigurations-H工VAppScation/TcfnptetesNameWdftefServiceApfMicdtionAllowparallelrunConfigurationCodeCoveragelogsSto
2、reasprojectfileMdinc3ss:cxnxMnpleomplexcontrollef.WiteonVMoptions:Programarguments:-XX:WKlCC-XX:UxCCPauMM11is-30Workingdirectory:Environmentvariables:Redirectinputfrom:C:DaUCodeGitHubSpnngFamilyChapter6cocnplex-cotrollerUsedastotmodule1COmPleXYontrOIIefIndudedependefwswithPrvklejps119712;28672Launch
3、er23824RemoteMavenServer3622324Jps;17884WaiterserviceApplicationh.C:DataCode6itHubSpringFamilyChapter6coRplex-controller4 .执行命令:jmap-heap17084,可能因为我电脑上安装的是java11,此命令不好使C:DataCodeGitHubSpringFamilyChapter6coBplex-controllerjpsI19712i26672Launcher:23824RemoteHavenServr3622324JpsI17884WaiterserviceAopl
4、lcatlonC:DataCodeGitHubSpringFanilyChapter6conplex-controllerjnap-heap17884Error:-heapoptionusedCannotconnecttocoredumporremotedebugserver.Usejhsdbj18pInsteadC:DataCodeGitHubSpringFamilyChapter6conple-controlaler5 .根据提示,最终执行命令:jhsdbjmap-heaP-Pidl7084。结果如下:C:DataCodeGitHubSpringFamilyChapter6comple-c
5、ontrollerjhsdbjmap-heap-pid17084AttachingtoprocessID17084,pleasewait.Debuggerattachedsuccessfully.Servercompilerdetected.JVMversionis11.0.2+9-LTSusingthread-localobjectallocation.Garbage-First(Gl)GCwith8thread(s)=40=70 (2000.0MB)HeapConfiguration:MinHeapFreeRatioMaxHeapFreeRatio=(1.2812MB)=(1200.0MB
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 作业 实践
