KwaiAppTeam / KOOM

KOOM is an OOM killer on mobile platform by Kwai.
Other
3.16k stars 421 forks source link

dump时,实际代码没有进行裁剪 #174

Closed snlove closed 2 years ago

snlove commented 2 years ago

阅读代码,发现在master分支,2.0.0分支上,OOMMonitor中使用的都为ForkJvmHeapDumper.该类并没有进行dump前后open和write方法hook相关的逻辑,实际测试类,使用的ForkStripHeapDumper,因此,OOMMonitor应该也是此类

    MonitorLog.i(TAG, "hprof analysis dir:$hprofAnalysisDir")

      ForkJvmHeapDumper().run {
        dump(hprofFile.absolutePath)
      }

      MonitorLog.i(TAG, "end hprof dump", true)
      Thread.sleep(1000) // make sure file synced to disk.
      MonitorLog.i(TAG, "start hprof analysis")

      startAnalysisService(hprofFile, jsonFile, mTrackReasons.joinToString())
AndroidInternal commented 2 years ago

分析原始镜像