use of com.ibm.j9ddr.vm29.pointer.generated.J9SRPHashTableInternalPointer in project openj9 by eclipse.
the class WalkInternTableCommand method printSharedTableStructure.
/**
* typedef struct J9SharedInvariantInternTable {
* UDATA (*performNodeAction)(struct J9SharedInvariantInternTable *sharedInvariantInternTable, struct J9SharedInternSRPHashTableEntry *node, UDATA action, void* userData);
* UDATA flags;
* omrthread_monitor_t *tableInternFxMutex;
* struct J9SRPHashTable* sharedInvariantSRPHashtable;
* struct J9SharedInternSRPHashTableEntry* headNode;
* struct J9SharedInternSRPHashTableEntry* tailNode;
* J9SRP* sharedTailNodePtr;
* J9SRP* sharedHeadNodePtr;
* U_32* totalSharedNodesPtr;
* U_32* totalSharedWeightPtr;
* struct J9ClassLoader* systemClassLoader;
*} J9SharedInvariantInternTable;
*
* typedef struct J9SRPHashTable {
* const char* tableName;
* struct J9SRPHashTableInternal* srpHashtableInternal;
* UDATA (*hashFn)(void *key, void *userData);
* UDATA (*hashEqualFn)(void *existingEntry,void *key, void *userData);
* void (*printFn)(J9PortLibrary *portLibrary, void *key, void *userData);
* struct J9PortLibrary* portLibrary;
* void* functionUserData;
* UDATA flags;
* } J9SRPHashTable;
*
* typedef struct J9SRPHashTableInternal {
* U_32 tableSize;
* U_32 numberOfNodes;
* U_32 entrySize;
* U_32 nodeSize;
* U_32 flags;
* J9SRP nodes;
* J9SRP nodePool;
* } J9SRPHashTableInternal;
*
* Prints the info for three VM structures that are shown above and used for shared intern table.
* 1. J9SharedInvariantInternTable
* 2. J9SRPHashTable
* 3. J9SRPHashTableInternal
*
* @param out PrintStream
* @throws CorruptDataException
* @return void
*/
private void printSharedTableStructure(PrintStream out) throws CorruptDataException {
J9JavaVMPointer vm = J9RASHelper.getVM(DataType.getJ9RASPointer());
J9SharedInvariantInternTablePointer sharedInternTable;
sharedInternTable = vm.sharedInvariantInternTable();
if (!sharedInternTable.isNull()) {
out.println(sharedInternTable.formatFullInteractive());
}
out.append("Total Shared Weight : " + sharedInternTable.totalSharedWeightPtr().at(0).longValue() + nl);
J9SRPHashTablePointer srphashtable = sharedInternTable.sharedInvariantSRPHashtable();
if (!srphashtable.isNull()) {
out.println(srphashtable.formatFullInteractive());
}
J9SRPHashTableInternalPointer srpHashTableInternal = srphashtable.srpHashtableInternal();
if (!srpHashTableInternal.isNull()) {
out.println(srpHashTableInternal.formatFullInteractive());
}
}
Aggregations