JBOSSProfilerPerformanceProfiling
ContentsMotivation–TheproblemProfilingProfilingToolsJavaandProfilingJBossProfilerExample
MotivationMorecomputingsinsarecommittedinthenameofefficiency(withoutnecessarilyachievingit)thanforanyothersinglereason-includingblindstupidity.
--Prof.WilliamA.WulfWeshouldforgetaboutsmallefficiencies,sayabout97%ofthetime:prematureoptimizationistherootofallevil.
--Prof.DonaldE.Knuth
WhatisaprofilerAprogramthathelpsyoufigureoutwhereaprogramisspendingmostofitstime.discoverhowitisusingmemory.howmanyofwhatsortsofobject.
WhatisaprofilertoolToolusedforprogramanalysisprogramanalysisistheuseofspecializedsoftware,calledaprofiler,togatherdataaboutaprogramsexecution.Theprofilerisusedtodeterminehowlongcertainpartsoftheprogramtaketoexecutehowoftentheyareexecutedtogeneratethecallgraph(themathematicalgraphofwhichfunctionscallwhichotherfunctions)
InfluentalProfiler1982Gprof:aCallGraphExecutionProfileraddingastopwatchtoeachfunction(compilewith–pgflagwithgcc,runprogram-gmon.outrungprofprogramanalysesgmon.out)JProbeOptimizeIT2004gprofandappearedonthelistofthe20mostinfluentalPLDI(programminglanguagedesignandimplementation)ofalltime
MethodsofdatagatheringStatisticalprofilersSamplingatimerthreadsuspendsallthreadsperiodically(10ms)looksupthecallstackofeachthreadProc:fastConst:howmanytimeswasthemethodcalled–cantdeduce.InstrumentingProc:canpotentiallybeveryspecificCons:cancausebugsslowsdownthetargetprogram
HowcanIperformanceprofilemyJavacode?[*]java-profMyClassExampleAsimpleclasspublicclassTomer{ publicstaticvoidmain(String[]args){ System.out.println(hithere); }}
RunningtheclasswithprofilerAfilefwascreatedthatcontainsc:\tempjava-profTomerhithereDumpingCPUusageinoldprofformat...done.countcallee
您可能关注的文档
- 物质检验基础:高考总复习.pdf
- 麻豆馆:打造O2O模特生涯发展垂直社区.pdf
- 报表解决方案与OSS性能分析器应用案例.pdf
- 实验3:类AIGC应用与实践.pdf
- G354安义东互通至鼎湖镇段公路改建安义县南外环工程环境影响报告书.pdf
- 南通港通州湾港区吕四作业区环抱式港池中港池连接水域工程环境影响报告书.pdf
- 顺毅宜昌化工有限公司年产3000吨SYN20D11改扩建项目环境影响报告书.pdf
- 喷墨打印机及喷墨打印墨水、介质材料研发生产基地项目环境影响.pdf
- 内蒙古世纪呼白酒业有限责任公司年产20000吨优质白酒生产基地建设项目环境影响报告书.pdf
- 5.6万吨年废催化剂综合利用项目环境影响报告书.pdf
最近下载
- 出口涂覆的陶瓷蜂窝体及其制造方法.pdf VIP
- 2025-2030无线电综测仪行业发展趋势及前景竞争力策略分析研究报告.docx
- 豪华曹操传2014图文攻略.docx VIP
- 【中邮-2026研报】天智航(688277):骨科机器人龙头有望受益于政策拐点,商业模式或持续优化.pdf VIP
- 人教版高中化学选择性必修3有机化学基础精品课件 第五章 合成高分子 第一节 合成高分子的基本方法.ppt VIP
- 最新人教版八年级下册物理期末试卷及答案 .pdf VIP
- 小学数学一年级下册期末试卷C.doc VIP
- 记账凭证封面打印模板.docx VIP
- 学习适应性测验(AAT)(小学五、六年级).doc VIP
- 11.第五章物流业与信贷市场.ppt VIP
原创力文档

文档评论(0)