op_parse_event.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "op_parse_event.h"
#include "op_string.h"
#include "op_events.h"
Include dependency graph for op_parse_event.c:

Go to the source code of this file.

Functions

static char * next_part (char const **str)
static int parse_ulong (char const *str)
size_t parse_events (struct parsed_event *parsed_events, size_t max_events, char const *const *events)

Detailed Description

event parsing

You can have silliness here.

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

Definition in file op_parse_event.c.


Function Documentation

static char* next_part ( char const **  str  )  [static]

Definition at line 22 of file op_parse_event.c.

References op_xstrndup().

Referenced by parse_events().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t parse_events ( struct parsed_event parsed_events,
size_t  max_events,
char const *const *  events 
)
Parameters:
parsed_events array of events to fill in
max_events size of parsed_events
events null terminated array of events string on the form event_name:count[:unit_mask:kernel:user]

parse events given by the nil terminated array events and fill in parsed_events with results. Events validity are not checked except. A fatal error occur if number of events is greater than max_events.

Return the number of events parsed.

Definition at line 61 of file op_parse_event.c.

References parsed_event::count, parsed_event::kernel, parsed_event::name, next_part(), parse_ulong(), TIMER_EVENT_NAME, parsed_event::unit_mask, parsed_event::unit_mask_name, parsed_event::unit_mask_valid, and parsed_event::user.

Referenced by do_test(), resolve_events(), show_extra_mask(), and show_unit_mask().

Here is the call graph for this function:

Here is the caller graph for this function:

static int parse_ulong ( char const *  str  )  [static]

Definition at line 47 of file op_parse_event.c.

Referenced by parse_events().

Here is the caller graph for this function:


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1