Nws puas muaj kev nyab xeeb rau rho tawm Hprof cov ntaub ntawv?
Nws puas muaj kev nyab xeeb rau rho tawm Hprof cov ntaub ntawv?

Video: Nws puas muaj kev nyab xeeb rau rho tawm Hprof cov ntaub ntawv?

Video: Nws puas muaj kev nyab xeeb rau rho tawm Hprof cov ntaub ntawv?
Video: ua zoo poob peev los lawm tub huas xyooj MV 2023 2024, Hlis ntuj nqeg
Anonim

Yog, nws zoo kawg nkaus muaj kev nyab xeeb los rho tawm tus ntaub ntawv . Nws yog siv los ntawm programmers hauv kev debugging yuam kev hauv cov kev pab cuam. Yog tias koj tsis yog tus tsim tawm, tsis ua haujlwm debugging qhov kev pab cuam tshwj xeeb, lossis tsis koom nrog hauv kev thov txhawb nqa txog kab laum hauv qhov program ntawd - koj yuav tsis xav tau ntaub ntawv.

Ib yam li ntawd, koj tuaj yeem nug, vim li cas Hprof cov ntaub ntawv raug tsim?

Ib Hprof file tuaj yeem yog tsim raws li lub pob pov tseg ntawm lub cim xeeb ntawm Java ™ txheej txheem. Qhov no feem ntau yog tsim thaum muaj qhov tsis nco qab tshwm sim ntawm qhov system.

Tsis tas li ntawd, cov ntaub ntawv Hprof yog dab tsi? HProf yog ib lub cuab yeej ua rau hauv JDK rau profileing CPU thiab heap siv hauv JVM. Java txheej txheem poob yuav tsim ib qho hprof cov muaj ib lub pob pov tseg ntawm cov txheej txheem thaum lub sijhawm ua tsis tiav. Qhov no feem ntau pom nyob rau hauv scenarios nrog "java.lang. OutOfMemoryError"

Yog li ntawd, peb puas tuaj yeem tshem tawm cov ntaub ntawv pov tseg heap?

Koj tuaj yeem rho tawm lub cim xeeb dumps kom tso chaw nyob ntawm koj lub hard disk. Txoj hauj lwm no ua tau ua tiav los ntawm kev siv tus Data Cleanup Utility. Txawm li cas los xij, yog tias koj xav rho tawm nws mus tas li los ntawm tus system, tom qab ntawd siv cov ntaub ntawv tshem tawm xws li Stellar BitRaser rau Cov ntaub ntawv yog koj qhov kev xaiv zoo tshaj plaws.

Heap dumps khaws cia nyob qhov twg?

Heap dumps muaj nyob rau hauv pob tseg sub-tab hauv lub qhov rais loj. Koj tuaj yeem qhib hom ntawv binary pob tseg cov ntaub ntawv (. hprof) khaws cia rau hauv koj lub zos lossis siv Java VisualVM coj pob tseg pob ntawm kev khiav haujlwm.

Pom zoo: