Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef _GLIBCXX_PROFILE_PROFILER_HASHTABLE_SIZE_H
00038 #define _GLIBCXX_PROFILE_PROFILER_HASHTABLE_SIZE_H 1
00039
00040 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00041 #include <cstdlib>
00042 #include <cstdio>
00043 #include <cstring>
00044 #else
00045 #include <stdlib.h>
00046 #include <stdio.h>
00047 #include <string.h>
00048 #endif
00049 #include "profile/impl/profiler.h"
00050 #include "profile/impl/profiler_node.h"
00051 #include "profile/impl/profiler_trace.h"
00052 #include "profile/impl/profiler_state.h"
00053 #include "profile/impl/profiler_container_size.h"
00054
00055 namespace __gnu_profile
00056 {
00057
00058
00059 class __trace_hashtable_size : public __trace_container_size
00060 {
00061 public:
00062 __trace_hashtable_size() : __trace_container_size()
00063 {
00064 __id = "hashtable-size";
00065 }
00066 };
00067
00068 inline void __trace_hashtable_size_init()
00069 {
00070 _GLIBCXX_PROFILE_DATA(_S_hashtable_size) = new __trace_hashtable_size();
00071 }
00072
00073 inline void __trace_hashtable_size_report(FILE* __f,
00074 __warning_vector_t& __warnings)
00075 {
00076 if (_GLIBCXX_PROFILE_DATA(_S_hashtable_size)) {
00077 _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->__collect_warnings(__warnings);
00078 _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->__write(__f);
00079 }
00080 }
00081
00082 inline void __trace_hashtable_size_construct(const void* __obj, size_t __num)
00083 {
00084 if (!__profcxx_init()) return;
00085
00086 _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->__insert(__obj, __get_stack(),
00087 __num);
00088 }
00089
00090 inline void __trace_hashtable_size_destruct(const void* __obj, size_t __num,
00091 size_t __inum)
00092 {
00093 if (!__profcxx_init()) return;
00094
00095 _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->__destruct(__obj, __num, __inum);
00096 }
00097
00098 inline void __trace_hashtable_size_resize(const void* __obj, size_t __from,
00099 size_t __to)
00100 {
00101 if (!__profcxx_init()) return;
00102
00103 _GLIBCXX_PROFILE_DATA(_S_hashtable_size)->__resize(__obj, __from, __to);
00104 }
00105
00106 }
00107
00108 #endif