[art] Add GetPreOomeGcCount API

It's difficult to analyze sluggish issue due to excessive GC.
So, I would like to add API for GC status check.

GetPreOomeGcCount
  Return the count of Pre OOME(Out-Of-Memory-Exception) GC.
  When process almost ran out of heap, so just before throw OOME,
  this GC will be performed.
  How to use : Debug.getRuntimeStat("art.gc.pre-oome-gc-count")

This must be submitted with the libcore code.

Test: check value using Debug.getRuntimeStat()
Change-Id: I00885c3c60a28e606f22e93c774805b5acc7c3e7
3 files changed