opd_cookie.c File Reference

#include "opd_cookie.h"
#include "oprofiled.h"
#include "op_list.h"
#include "op_libiberty.h"
#include <sys/syscall.h>
#include <unistd.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
Include dependency graph for opd_cookie.c:

Go to the source code of this file.

Data Structures

struct  cookie_entry

Defines

#define HASH_SIZE   512
#define HASH_BITS   (HASH_SIZE - 1)

Functions

static int lookup_dcookie (cookie_t cookie, char *buf, size_t size)
static struct cookie_entrycreate_cookie (cookie_t cookie)
static unsigned long hash_cookie (cookie_t cookie)
char const * find_cookie (cookie_t cookie)
int is_cookie_ignored (cookie_t cookie)
char const * verbose_cookie (cookie_t cookie)
void cookie_init (void)

Variables

static struct list_head hashes [HASH_SIZE]

Detailed Description

cookie -> name cache

Remarks:
Copyright 2002, 2005 OProfile authors
Read the file COPYING
Author:
John Levon

Definition in file opd_cookie.c.


Define Documentation

#define HASH_BITS   (HASH_SIZE - 1)

Definition at line 99 of file opd_cookie.c.

#define HASH_SIZE   512

Definition at line 98 of file opd_cookie.c.


Function Documentation

void cookie_init ( void   ) 

Definition at line 204 of file opd_cookie.c.

References HASH_SIZE, hashes, and list_init().

Referenced by opd_26_init().

Here is the call graph for this function:

Here is the caller graph for this function:

static struct cookie_entry* create_cookie ( cookie_t  cookie  )  [static, read]

Definition at line 103 of file opd_cookie.c.

References cookie_entry::ignored, is_image_ignored(), lookup_dcookie(), cookie_entry::name, and cookie_entry::value.

Referenced by find_cookie(), and is_cookie_ignored().

Here is the call graph for this function:

Here is the caller graph for this function:

char const* find_cookie ( cookie_t  cookie  ) 

Return the name of the given dcookie. May return NULL on failure.

Definition at line 134 of file opd_cookie.c.

References create_cookie(), hash_cookie(), hashes, INVALID_COOKIE, cookie_entry::list, list_add(), list_entry, list_for_each, cookie_entry::name, NO_COOKIE, and cookie_entry::value.

Referenced by code_ctx_switch(), code_spu_ctx_switch(), get_dep_name(), mangle_filename(), and opd_open_sample_file().

Here is the call graph for this function:

Here is the caller graph for this function:

static unsigned long hash_cookie ( cookie_t  cookie  )  [static]

Definition at line 128 of file opd_cookie.c.

References DCOOKIE_SHIFT, and HASH_SIZE.

Referenced by find_cookie(), is_cookie_ignored(), and verbose_cookie().

Here is the caller graph for this function:

int is_cookie_ignored ( cookie_t  cookie  ) 

return true if this cookie should be ignored

Definition at line 157 of file opd_cookie.c.

References create_cookie(), hash_cookie(), hashes, cookie_entry::ignored, INVALID_COOKIE, cookie_entry::list, list_add(), list_entry, list_for_each, NO_COOKIE, and cookie_entry::value.

Referenced by is_sf_ignored().

Here is the call graph for this function:

Here is the caller graph for this function:

static int lookup_dcookie ( cookie_t  cookie,
char *  buf,
size_t  size 
) [inline, static]

Definition at line 83 of file opd_cookie.c.

Referenced by create_cookie().

Here is the caller graph for this function:

char const* verbose_cookie ( cookie_t  cookie  ) 

give a textual description of the cookie

Definition at line 179 of file opd_cookie.c.

References hash_cookie(), hashes, INVALID_COOKIE, cookie_entry::list, list_entry, list_for_each, cookie_entry::name, NO_COOKIE, and cookie_entry::value.

Referenced by add_anon_mapping(), clear_anon_maps(), code_cookie_switch(), sfile_find(), and verbose_print_sample().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

struct list_head hashes[HASH_SIZE] [static]

Definition at line 101 of file opd_cookie.c.

Referenced by cookie_init(), find_cookie(), is_cookie_ignored(), and verbose_cookie().


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1