Extend memory usage events to report mapped memory usage.
PiperOrigin-RevId: 212887555 Change-Id: I3545383ce903cbe9f00d9b5288d9ef9a049b9f4f
This commit is contained in:
parent
9c6b38e295
commit
adf8f33970
|
@ -94,5 +94,8 @@ func (m *MemoryEvents) emit() {
|
|||
snapshot, _ := usage.MemoryAccounting.Copy()
|
||||
total := totalPlatform + snapshot.Mapped
|
||||
|
||||
eventchannel.Emit(&pb.MemoryUsageEvent{Total: total})
|
||||
eventchannel.Emit(&pb.MemoryUsageEvent{
|
||||
Mapped: snapshot.Mapped,
|
||||
Total: total,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -22,4 +22,8 @@ message MemoryUsageEvent {
|
|||
// The total memory usage of the sandboxed application in bytes, calculated
|
||||
// using the 'fast' method.
|
||||
uint64 total = 1;
|
||||
|
||||
// Memory used to back memory-mapped regions for files in the application, in
|
||||
// bytes. This corresponds to the usage.MemoryKind.Mapped memory type.
|
||||
uint64 mapped = 2;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue