< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp

Print this page
@@ -1,7 +1,8 @@
  /*
   * Copyright (c) 2017, 2021, Red Hat, Inc. All rights reserved.
+  * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

@@ -39,20 +40,37 @@
  #include "runtime/vmThread.hpp"
  #include "runtime/vmOperations.hpp"
  #include "services/memoryService.hpp"
  
  class GCTimer;
+ class ShenandoahGeneration;
+ 
+ #define SHENANDOAH_RETURN_EVENT_MESSAGE(generation_type, prefix, postfix) \
+   switch (generation_type) {                                              \
+     case NON_GEN:                                                         \
+       return prefix postfix;                                              \
+     case GLOBAL:                                                          \
+       return prefix " (Global)" postfix;                                  \
+     case YOUNG:                                                           \
+       return prefix " (Young)" postfix;                                   \
+     case OLD:                                                             \
+       return prefix " (Old)" postfix;                                     \
+     default:                                                              \
+       ShouldNotReachHere();                                               \
+       return prefix " (Unknown)" postfix;                                 \
+   }                                                                       \
  
  class ShenandoahGCSession : public StackObj {
  private:
    ShenandoahHeap* const _heap;
+   ShenandoahGeneration* const _generation;
    GCTimer*  const _timer;
    GCTracer* const _tracer;
  
    TraceMemoryManagerStats _trace_cycle;
  public:
-   ShenandoahGCSession(GCCause::Cause cause);
+   ShenandoahGCSession(GCCause::Cause cause, ShenandoahGeneration* generation);
    ~ShenandoahGCSession();
  };
  
  /*
   * ShenandoahGCPhaseTiming tracks Shenandoah specific timing information
< prev index next >