akaros/user/perfmon/pfmlib_amd64_fam11h.c
<<
>>
Prefs
   1/*
   2 * pfmlib_amd64_fam11h.c : AMD64 Family 11h
   3 *
   4 * Copyright (c) 2012 University of Tennessee
   5 * Contributed by Vince Weaver <vweaver1@utk.edu>
   6 *
   7 * Permission is hereby granted, free of charge, to any person obtaining a copy
   8 * of this software and associated documentation files (the "Software"), to deal
   9 * in the Software without restriction, including without limitation the rights
  10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  11 * of the Software, and to permit persons to whom the Software is furnished to do so,
  12 * subject to the following conditions:
  13 *
  14 * The above copyright notice and this permission notice shall be included in all
  15 * copies or substantial portions of the Software.
  16 *
  17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
  18 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  19 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  20 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
  21 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
  22 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23 *
  24 */
  25
  26/* private headers */
  27#include "pfmlib_priv.h"
  28#include "pfmlib_amd64_priv.h"
  29#include "events/amd64_events_fam11h.h"
  30
  31#define DEFINE_FAM11H_REV(d, n, r, pmuid) \
  32pfmlib_pmu_t amd64_fam11h_##n##_support={                       \
  33        .desc                   = "AMD64 Fam11h "#d,            \
  34        .name                   = "amd64_fam11h_"#n,            \
  35        .pmu                    = pmuid,                        \
  36        .pmu_rev                = r,                            \
  37        .pme_count              = LIBPFM_ARRAY_SIZE(amd64_fam11h_pe),\
  38        .type                   = PFM_PMU_TYPE_CORE,            \
  39        .supported_plm          = AMD64_FAM10H_PLM,             \
  40        .num_cntrs              = 4,                            \
  41        .max_encoding           = 1,                            \
  42        .pe                     = amd64_fam11h_pe,              \
  43        .atdesc                 = amd64_mods,                   \
  44        .flags                  = PFMLIB_PMU_FL_RAW_UMASK,      \
  45                                                                \
  46        .cpu_family             = pmuid,                        \
  47        .pmu_detect             = pfm_amd64_family_detect,      \
  48        .get_event_encoding[PFM_OS_NONE] = pfm_amd64_get_encoding,\
  49         PFMLIB_ENCODE_PERF(pfm_amd64_get_perf_encoding),       \
  50        .get_event_first        = pfm_amd64_get_event_first,    \
  51        .get_event_next         = pfm_amd64_get_event_next,     \
  52        .event_is_valid         = pfm_amd64_event_is_valid,     \
  53        .validate_table         = pfm_amd64_validate_table,     \
  54        .get_event_info         = pfm_amd64_get_event_info,     \
  55        .get_event_attr_info    = pfm_amd64_get_event_attr_info,\
  56         PFMLIB_VALID_PERF_PATTRS(pfm_amd64_perf_validate_pattrs),\
  57        .get_event_nattrs       = pfm_amd64_get_event_nattrs,   \
  58}
  59
  60DEFINE_FAM11H_REV(Turion, turion, 0, PFM_PMU_AMD64_FAM11H_TURION);
  61
  62