#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>
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_entry * | create_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] |
cookie -> name cache
Definition in file opd_cookie.c.
#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.
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().
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().
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().
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().
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().
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().
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().
Definition at line 101 of file opd_cookie.c.
Referenced by cookie_init(), find_cookie(), is_cookie_ignored(), and verbose_cookie().