summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/profile/impl/profiler_hashtable_size.h')
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_hashtable_size.h97
1 files changed, 47 insertions, 50 deletions
diff --git a/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h b/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h
index 8248f47e75d..9d5cbc793ef 100644
--- a/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h
+++ b/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
//
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -37,15 +37,6 @@
#ifndef _GLIBCXX_PROFILE_PROFILER_HASHTABLE_SIZE_H
#define _GLIBCXX_PROFILE_PROFILER_HASHTABLE_SIZE_H 1
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-#include <cstdlib>
-#include <cstdio>
-#include <cstring>
-#else
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#endif
#include "profile/impl/profiler.h"
#include "profile/impl/profiler_node.h"
#include "profile/impl/profiler_trace.h"
@@ -54,54 +45,60 @@
namespace __gnu_profile
{
-
-/** @brief Hashtable size instrumentation trace producer. */
-class __trace_hashtable_size : public __trace_container_size
-{
- public:
- __trace_hashtable_size() : __trace_container_size()
+ /** @brief Hashtable size instrumentation trace producer. */
+ class __trace_hashtable_size
+ : public __trace_container_size
{
- __id = "hashtable-size";
- }
-};
-
-inline void __trace_hashtable_size_init()
-{
- _GLIBCXX_PROFILE_DATA(_S_hashtable_size) = new __trace_hashtable_size();
-}
-
-inline void __trace_hashtable_size_report(FILE* __f,
- __warning_vector_t& __warnings)
-{
- if (_GLIBCXX_PROFILE_DATA(_S_hashtable_size)) {
- _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->__collect_warnings(__warnings);
- _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->__write(__f);
+ public:
+ __trace_hashtable_size()
+ : __trace_container_size()
+ { __id = "hashtable-size"; }
+ };
+
+ inline void
+ __trace_hashtable_size_init()
+ { _GLIBCXX_PROFILE_DATA(_S_hashtable_size) = new __trace_hashtable_size(); }
+
+ inline void
+ __trace_hashtable_size_report(FILE* __f, __warning_vector_t& __warnings)
+ {
+ if (_GLIBCXX_PROFILE_DATA(_S_hashtable_size))
+ {
+ _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->
+ __collect_warnings(__warnings);
+ _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->__write(__f);
+ }
}
-}
-inline void __trace_hashtable_size_construct(const void* __obj, size_t __num)
-{
- if (!__profcxx_init()) return;
+ inline void
+ __trace_hashtable_size_construct(const void* __obj, std::size_t __num)
+ {
+ if (!__profcxx_init())
+ return;
- _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->__insert(__obj, __get_stack(),
- __num);
-}
+ _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->__insert(__obj, __get_stack(),
+ __num);
+ }
-inline void __trace_hashtable_size_destruct(const void* __obj, size_t __num,
- size_t __inum)
-{
- if (!__profcxx_init()) return;
+ inline void
+ __trace_hashtable_size_destruct(const void* __obj, std::size_t __num,
+ std::size_t __inum)
+ {
+ if (!__profcxx_init())
+ return;
- _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->__destruct(__obj, __num, __inum);
-}
+ _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->__destruct(__obj, __num, __inum);
+ }
-inline void __trace_hashtable_size_resize(const void* __obj, size_t __from,
- size_t __to)
-{
- if (!__profcxx_init()) return;
+ inline void
+ __trace_hashtable_size_resize(const void* __obj, std::size_t __from,
+ std::size_t __to)
+ {
+ if (!__profcxx_init())
+ return;
- _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->__resize(__obj, __from, __to);
-}
+ _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->__resize(__obj, __from, __to);
+ }
} // namespace __gnu_profile