/*******************************************************************************1* Copyright (c) 1991, 2020 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* 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-exception20*******************************************************************************/21#include "j9ddr.h"22#include "ddrtable.h"2324extern const J9DDRStructDefinition *getJITStructTable(void);25extern const J9DDRStructDefinition *getAlgorithmVersionStructTable(void);2627/*28* Generated struct table functions take a portLib29* to allow stub functions to print warning messages.30*/31extern const J9DDRStructDefinition *getJITAutomatedStructTable(struct OMRPortLibrary *portLib);32extern const J9DDRStructDefinition *getOmrStructTable(struct OMRPortLibrary *portLib);33extern const J9DDRStructDefinition *getVMStructTable(struct OMRPortLibrary *portLib);34extern const J9DDRStructDefinition *getStackWalkerStructTable(struct OMRPortLibrary *portLib);35extern const J9DDRStructDefinition *getJ9PortStructTable(struct OMRPortLibrary *portLib);36extern const J9DDRStructDefinition *getGCStructTable(struct OMRPortLibrary *portLib);37extern const J9DDRStructDefinition *getDDR_CPPStructTable(struct OMRPortLibrary *portLib);3839const J9DDRStructDefinition **40initializeDDRComponents(OMRPortLibrary *portLib)41{42OMRPORT_ACCESS_FROM_OMRPORT(portLib);4344const J9DDRStructDefinition **list = omrmem_allocate_memory(45(J9DDR_COMPONENT_COUNT + 1) * sizeof(J9DDRStructDefinition *),46OMRMEM_CATEGORY_VM);4748if (NULL != list) {49UDATA i = 0;5051list[i++] = getOmrStructTable(portLib);52list[i++] = getVMStructTable(portLib);53list[i++] = getStackWalkerStructTable(portLib);54list[i++] = getGCStructTable(portLib);55list[i++] = getJ9PortStructTable(portLib);56list[i++] = getAlgorithmVersionStructTable();57list[i++] = getJITStructTable();58list[i++] = getJITAutomatedStructTable(portLib);59list[i++] = getDDR_CPPStructTable(portLib);60list[i] = NULL;61/* increment i here if it needs to be used further */62}6364return list;65}666768