Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/gc_verbose_old_events/VerboseEventConcurrentStart.hpp
5985 views
1
2
/*******************************************************************************
3
* Copyright (c) 1991, 2019 IBM Corp. and others
4
*
5
* This program and the accompanying materials are made available under
6
* the terms of the Eclipse Public License 2.0 which accompanies this
7
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
8
* or the Apache License, Version 2.0 which accompanies this distribution and
9
* is available at https://www.apache.org/licenses/LICENSE-2.0.
10
*
11
* This Source Code may also be made available under the following
12
* Secondary Licenses when the conditions for such availability set
13
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
14
* General Public License, version 2 with the GNU Classpath
15
* Exception [1] and GNU General Public License, version 2 with the
16
* OpenJDK Assembly Exception [2].
17
*
18
* [1] https://www.gnu.org/software/classpath/license.html
19
* [2] http://openjdk.java.net/legal/assembly-exception.html
20
*
21
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
22
*******************************************************************************/
23
24
#if !defined(EVENT_CON_START_HPP_)
25
#define EVENT_CON_START_HPP_
26
27
#include "j9.h"
28
#include "j9cfg.h"
29
#include "j9port.h"
30
#include "mmhook.h"
31
32
#include "VerboseEventGCStart.hpp"
33
34
/**
35
* Stores the data relating to the start of a concurrent collection.
36
* @ingroup GC_verbose_events
37
*/
38
class MM_VerboseEventConcurrentStart : public MM_VerboseEventGCStart
39
{
40
private:
41
/* Passed Data */
42
UDATA _traceTarget; /**< the targetted number of bytes to be concurrently traced */
43
UDATA _tracedTotal; /**< the number of bytes concurrently traced */
44
UDATA _tracedByMutators; /**< the number of bytes traced by mutators */
45
UDATA _tracedByHelpers; /**< the number of bytes traced by helper threads */
46
UDATA _cardsCleaned; /**< the number of cards cleaned */
47
UDATA _cardCleaningPhase1Threshold; /**< the number of free bytes at which we wish to start the first card cleaning phase */
48
UDATA _workStackOverflowOccured; /**< flag to indicate if workstack overflow has occured */
49
UDATA _workStackOverflowCount; /**< the number of times concurrent work stacks have overflowed */
50
UDATA _threadsToScanCount; /**< the number of threads which were live at kickoff whose stacks needed to be scanned */
51
UDATA _threadsScannedCount; /**< the actual number of threads whose stacks were scanned */
52
UDATA _cardCleaningReason; /**< the reason card cleaning was started */
53
54
/* External Data */
55
U_64 _lastConTime; /**< the timestamp of the last Concurrent collection */
56
UDATA _conCollectionCount; /**< the count of concurrent collections */
57
58
public:
59
60
static MM_VerboseEvent *newInstance(MM_ConcurrentCollectionStartEvent *event, J9HookInterface** hookInterface);
61
62
virtual void consumeEvents();
63
virtual void formattedOutput(MM_VerboseOutputAgent *agent);
64
65
MM_VerboseEventConcurrentStart(MM_ConcurrentCollectionStartEvent *event, J9HookInterface** hookInterface) :
66
MM_VerboseEventGCStart(event->currentThread, event->timestamp, event->eventid, event->gcStartData, hookInterface),
67
_traceTarget(event->traceTarget),
68
_tracedTotal(event->tracedTotal),
69
_tracedByMutators(event->tracedByMutators),
70
_tracedByHelpers(event->tracedByHelpers),
71
_cardsCleaned(event->cardsCleaned),
72
_cardCleaningPhase1Threshold(event->cardCleaningPhase1Threshold),
73
_workStackOverflowOccured(event->workStackOverflowOccured),
74
_workStackOverflowCount(event->workStackOverflowCount),
75
_threadsToScanCount(event->threadsToScanCount),
76
_threadsScannedCount(event->threadsScannedCount),
77
_cardCleaningReason(event->cardCleaningReason)
78
{};
79
};
80
81
#endif /* EVENT_CON_START_HPP_ */
82
83