342 EventGCHeapSummary e;
343 if (e.should_commit()) {
344 e.set_gcId(GCId::current());
345 e.set_when((u1)_when);
346 e.set_heapSpace(to_trace_struct(heap_space));
347 e.set_heapUsed(heap_summary->used());
348 e.commit();
349 }
350 }
351
352 void visit(const G1HeapSummary* g1_heap_summary) const {
353 visit((GCHeapSummary*)g1_heap_summary);
354
355 EventG1HeapSummary e;
356 if (e.should_commit()) {
357 e.set_gcId(GCId::current());
358 e.set_when((u1)_when);
359 e.set_edenUsedSize(g1_heap_summary->edenUsed());
360 e.set_edenTotalSize(g1_heap_summary->edenCapacity());
361 e.set_survivorUsedSize(g1_heap_summary->survivorUsed());
362 e.commit();
363 }
364 }
365
366 void visit(const PSHeapSummary* ps_heap_summary) const {
367 visit((GCHeapSummary*)ps_heap_summary);
368
369 const VirtualSpaceSummary& old_summary = ps_heap_summary->old();
370 const SpaceSummary& old_space = ps_heap_summary->old_space();
371 const VirtualSpaceSummary& young_summary = ps_heap_summary->young();
372 const SpaceSummary& eden_space = ps_heap_summary->eden();
373 const SpaceSummary& from_space = ps_heap_summary->from();
374 const SpaceSummary& to_space = ps_heap_summary->to();
375
376 EventPSHeapSummary e;
377 if (e.should_commit()) {
378 e.set_gcId(GCId::current());
379 e.set_when((u1)_when);
380
381 e.set_oldSpace(to_trace_struct(ps_heap_summary->old()));
|
342 EventGCHeapSummary e;
343 if (e.should_commit()) {
344 e.set_gcId(GCId::current());
345 e.set_when((u1)_when);
346 e.set_heapSpace(to_trace_struct(heap_space));
347 e.set_heapUsed(heap_summary->used());
348 e.commit();
349 }
350 }
351
352 void visit(const G1HeapSummary* g1_heap_summary) const {
353 visit((GCHeapSummary*)g1_heap_summary);
354
355 EventG1HeapSummary e;
356 if (e.should_commit()) {
357 e.set_gcId(GCId::current());
358 e.set_when((u1)_when);
359 e.set_edenUsedSize(g1_heap_summary->edenUsed());
360 e.set_edenTotalSize(g1_heap_summary->edenCapacity());
361 e.set_survivorUsedSize(g1_heap_summary->survivorUsed());
362 e.set_regions(g1_heap_summary->regions());
363 e.commit();
364 }
365 }
366
367 void visit(const PSHeapSummary* ps_heap_summary) const {
368 visit((GCHeapSummary*)ps_heap_summary);
369
370 const VirtualSpaceSummary& old_summary = ps_heap_summary->old();
371 const SpaceSummary& old_space = ps_heap_summary->old_space();
372 const VirtualSpaceSummary& young_summary = ps_heap_summary->young();
373 const SpaceSummary& eden_space = ps_heap_summary->eden();
374 const SpaceSummary& from_space = ps_heap_summary->from();
375 const SpaceSummary& to_space = ps_heap_summary->to();
376
377 EventPSHeapSummary e;
378 if (e.should_commit()) {
379 e.set_gcId(GCId::current());
380 e.set_when((u1)_when);
381
382 e.set_oldSpace(to_trace_struct(ps_heap_summary->old()));
|