Skip to content

Commit

Permalink
Add support for ARM AWS Graviton3 (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
falquez committed Oct 20, 2023
1 parent f50ee71 commit 2b5759b
Show file tree
Hide file tree
Showing 5 changed files with 585 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/includes/perfmon_graviton3.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* =======================================================================================
*
* Filename: perfmon_graviton3.h
*
* Description: Header File of perfmon module for ARM AWS Graviton3
*
* Version: <VERSION>
* Released: <DATE>
*
* Author: Carlos Falquez, c.falquez@fz-juelich.de
* Project: likwid
*
* Copyright (C) 2022, Forschungszentrum Juelich, Germany
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* =======================================================================================
*/

#include <perfmon_graviton3_events.h>
#include <perfmon_graviton3_counters.h>

static int perfmon_numCountersGraviton3 = NUM_COUNTERS_GRAVITON3;
static int perfmon_numArchEventsGraviton3 = NUM_ARCH_EVENTS_GRAVITON3;
48 changes: 48 additions & 0 deletions src/includes/perfmon_graviton3_counters.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* =======================================================================================
*
* Filename: perfmon_graviton3_counters.h
*
* Description: Counter Header File of perfmon module for ARM AWS Graviton3
*
* Version: <VERSION>
* Released: <DATE>
*
* Author: Carlos Falquez, c.falquez@fz-juelich.de
* Project: likwid
*
* Copyright (C) 2022, Forschungszentrum Juelich, Germany
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* =======================================================================================
*/

#define NUM_COUNTERS_GRAVITON3 6

static RegisterMap graviton3_counter_map[NUM_COUNTERS_GRAVITON3] = {
{"PMC0", PMC0, PMC, 0, 0, 0, 0, EVENT_OPTION_NONE_MASK},
{"PMC1", PMC1, PMC, 0, 0, 0, 0, EVENT_OPTION_NONE_MASK},
{"PMC2", PMC2, PMC, 0, 0, 0, 0, EVENT_OPTION_NONE_MASK},
{"PMC3", PMC3, PMC, 0, 0, 0, 0, EVENT_OPTION_NONE_MASK},
{"PMC4", PMC4, PMC, 0, 0, 0, 0, EVENT_OPTION_NONE_MASK},
{"PMC5", PMC5, PMC, 0, 0, 0, 0, EVENT_OPTION_NONE_MASK},
};

static BoxMap graviton3_box_map[NUM_UNITS] = {
[PMC] = {0, 0, 0, 0, 0, 0, 32},
};

static char* graviton3_translate_types[NUM_UNITS] = {
[PMC] = "/sys/bus/event_source/devices/armv8_pmuv3_0",
};
Loading

0 comments on commit 2b5759b

Please sign in to comment.