alloc_counter_tests.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include "op_parse_event.h"
#include "op_alloc_counter.h"
#include "op_events.h"
#include "op_hw_config.h"
#include "op_cpu_type.h"
Include dependency graph for alloc_counter_tests.c:

Go to the source code of this file.

Data Structures

struct  allocated_counter

Defines

#define MAX_EVENTS   20

Enumerations

enum  failure_type { no_failure, fail_to_find_event, fail_to_alloc_counter }

Functions

static void show_events (char const *const *events)
static void show_counter_map (size_t const *counter_map, size_t nr_events)
static void do_test (struct allocated_counter const *it)
int main (void)

Variables

static char const *const events_alpha_ev4_1 []
static char const *const events_alpha_ev4_2 []
static char const *const events_ppro_1 []
static char const *const events_ppro_2 []
static char const *const events_ppro_3 []
static char const *const events_ppro_4 []
static char const *const events_ppro_5 []
static char const *const events_p4_1 []
static char const *const events_p4_2 []
static char const *const events_mips_34k []
static struct
allocated_counter const 
tests []

Detailed Description

Remarks:
Copyright 2003 OProfile authors
Read the file COPYING
Author:
John Levon
Philippe Elie

Definition in file alloc_counter_tests.c.


Define Documentation

#define MAX_EVENTS   20

Definition at line 23 of file alloc_counter_tests.c.


Enumeration Type Documentation

Enumerator:
no_failure 
fail_to_find_event 
fail_to_alloc_counter 

Definition at line 27 of file alloc_counter_tests.c.


Function Documentation

static void do_test ( struct allocated_counter const *  it  )  [static]
int main ( void   ) 

Definition at line 207 of file alloc_counter_tests.c.

References CPU_NO_GOOD, allocated_counter::cpu_type, and do_test().

Here is the call graph for this function:

static void show_counter_map ( size_t const *  counter_map,
size_t  nr_events 
) [static]

Definition at line 138 of file alloc_counter_tests.c.

Referenced by do_test().

Here is the caller graph for this function:

static void show_events ( char const *const *  events  )  [static]

Definition at line 131 of file alloc_counter_tests.c.

Referenced by do_test().

Here is the caller graph for this function:


Variable Documentation

char const* const events_alpha_ev4_1[] [static]
Initial value:
 {
    "ISSUES:4096:0:1:1",
    NULL
}

Definition at line 43 of file alloc_counter_tests.c.

char const* const events_alpha_ev4_2[] [static]
Initial value:
 {
    "UNKNOWN_EVENT:4096:0:1:1",
    NULL
}

Definition at line 48 of file alloc_counter_tests.c.

char const* const events_mips_34k[] [static]
Initial value:
 {
    
    "DTLB_MISSES:500:0:1:1",
    "JR_31_INSNS:500:0:1:1",
    NULL
}

Definition at line 108 of file alloc_counter_tests.c.

char const* const events_p4_1[] [static]
Initial value:
 {
    "BRANCH_RETIRED:4096:1:1:1",
    "MISPRED_BRANCH_RETIRED:4096:1:1:1",
    "BPU_FETCH_REQUEST:4096:1:1:1",
    "ITLB_REFERENCE:4096:1:1:1",
    "MEMORY_CANCEL:4096:4:1:1",
    "MEMORY_COMPLETE:4096:1:1:1",
    "TC_MS_XFER:4096:1:1:1",
    "UOP_QUEUE_WRITES:4096:1:1:1",
    NULL
}

Definition at line 83 of file alloc_counter_tests.c.

char const* const events_p4_2[] [static]
Initial value:
 {
    
    "BRANCH_RETIRED:4096:1:1:1",
    "MISPRED_BRANCH_RETIRED:4096:1:1:1",
    "INSTR_RETIRED:4096:1:1:1",
    "BPU_FETCH_REQUEST:4096:1:1:1",
    "ITLB_REFERENCE:4096:1:1:1",
    "MEMORY_CANCEL:4096:4:1:1",
    "MEMORY_COMPLETE:4096:1:1:1",
    "TC_MS_XFER:4096:1:1:1",
    NULL
}

Definition at line 95 of file alloc_counter_tests.c.

char const* const events_ppro_1[] [static]
Initial value:
 {
    "CPU_CLK_UNHALTED:4096:0:1:1",
    NULL
}

Definition at line 53 of file alloc_counter_tests.c.

char const* const events_ppro_2[] [static]
Initial value:
 {
    "CPU_CLK_UNHALTED:4096:0:1:1",
    "DATA_MEM_REFS:4096:0:1:1",
    NULL
}

Definition at line 58 of file alloc_counter_tests.c.

char const* const events_ppro_3[] [static]
Initial value:
 {
    
    "COMP_FLOP_RET:4096:0:1:1",
    "FLOPS:4096:0:1:1",
    NULL
}

Definition at line 64 of file alloc_counter_tests.c.

char const* const events_ppro_4[] [static]
Initial value:
 {
    "FLOPS:4096:0:1:1",
    "FP_ASSIST:4096:0:1:1",
    NULL
}

Definition at line 71 of file alloc_counter_tests.c.

char const* const events_ppro_5[] [static]
Initial value:
 {
    "FP_ASSIST:4096:0:1:1",
    "FLOPS:4096:0:1:1",
    NULL
}

Definition at line 77 of file alloc_counter_tests.c.

struct allocated_counter const tests[] [static]
Initial value:

Definition at line 116 of file alloc_counter_tests.c.


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1