equal
deleted
inserted
replaced
30 #include "utilities/dtrace.hpp" |
30 #include "utilities/dtrace.hpp" |
31 #include "utilities/hashtable.hpp" |
31 #include "utilities/hashtable.hpp" |
32 #include "utilities/hashtable.inline.hpp" |
32 #include "utilities/hashtable.inline.hpp" |
33 |
33 |
34 |
34 |
|
35 #ifndef USDT2 |
35 HS_DTRACE_PROBE_DECL4(hs_private, hashtable__new_entry, |
36 HS_DTRACE_PROBE_DECL4(hs_private, hashtable__new_entry, |
36 void*, unsigned int, void*, void*); |
37 void*, unsigned int, void*, void*); |
|
38 #endif /* !USDT2 */ |
37 |
39 |
38 // This is a generic hashtable, designed to be used for the symbol |
40 // This is a generic hashtable, designed to be used for the symbol |
39 // and string tables. |
41 // and string tables. |
40 // |
42 // |
41 // It is implemented as an open hash table with a fixed number of buckets. |
43 // It is implemented as an open hash table with a fixed number of buckets. |
71 template <class T> HashtableEntry<T>* Hashtable<T>::new_entry(unsigned int hashValue, T obj) { |
73 template <class T> HashtableEntry<T>* Hashtable<T>::new_entry(unsigned int hashValue, T obj) { |
72 HashtableEntry<T>* entry; |
74 HashtableEntry<T>* entry; |
73 |
75 |
74 entry = (HashtableEntry<T>*)BasicHashtable::new_entry(hashValue); |
76 entry = (HashtableEntry<T>*)BasicHashtable::new_entry(hashValue); |
75 entry->set_literal(obj); |
77 entry->set_literal(obj); |
|
78 #ifndef USDT2 |
76 HS_DTRACE_PROBE4(hs_private, hashtable__new_entry, |
79 HS_DTRACE_PROBE4(hs_private, hashtable__new_entry, |
77 this, hashValue, obj, entry); |
80 this, hashValue, obj, entry); |
|
81 #else /* USDT2 */ |
|
82 HS_PRIVATE_HASHTABLE_NEW_ENTRY( |
|
83 this, hashValue, (uintptr_t) obj, entry); |
|
84 #endif /* USDT2 */ |
78 return entry; |
85 return entry; |
79 } |
86 } |
80 |
87 |
81 |
88 |
82 // Reverse the order of elements in the hash buckets. |
89 // Reverse the order of elements in the hash buckets. |