akaros/user/perfmon/pfmlib_amd64_k7.c
<<
>>
Prefs
   1/*
   2 * pfmlib_amd64_k7.c : AMD64 K7
   3 *
   4 * Copyright (c) 2010 Google, Inc
   5 * Contributed by Stephane Eranian <eranian@gmail.com>
   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_k7.h"
  30
  31
  32pfmlib_pmu_t amd64_k7_support={
  33        .desc                   = "AMD64 K7",
  34        .name                   = "amd64_k7",
  35        .pmu                    = PFM_PMU_AMD64_K7,
  36        .pmu_rev                = AMD64_K7,
  37        .pme_count              = LIBPFM_ARRAY_SIZE(amd64_k7_pe),
  38        .type                   = PFM_PMU_TYPE_CORE,
  39        .supported_plm          = AMD64_K7_PLM,
  40        .num_cntrs              = 4,
  41        .max_encoding           = 1,
  42        .pe                     = amd64_k7_pe,
  43        .atdesc                 = amd64_mods,
  44        .flags                  = PFMLIB_PMU_FL_RAW_UMASK,
  45
  46        .cpu_family             = PFM_PMU_AMD64_K7,
  47        .pmu_detect             = pfm_amd64_family_detect,
  48
  49        .get_event_encoding[PFM_OS_NONE] = pfm_amd64_get_encoding,
  50         PFMLIB_ENCODE_PERF(pfm_amd64_get_perf_encoding),
  51
  52        .get_event_first        = pfm_amd64_get_event_first,
  53        .get_event_next         = pfm_amd64_get_event_next,
  54        .event_is_valid         = pfm_amd64_event_is_valid,
  55        .validate_table         = pfm_amd64_validate_table,
  56        .get_event_info         = pfm_amd64_get_event_info,
  57        .get_event_attr_info    = pfm_amd64_get_event_attr_info,
  58         PFMLIB_VALID_PERF_PATTRS(pfm_amd64_perf_validate_pattrs),
  59        .get_event_nattrs       = pfm_amd64_get_event_nattrs,
  60};
  61