The global symbol table is implemented using a hash table. Under this mechanism, whenever a library is loaded (either implicitly or by using dlopen() or shl_load()), the mechanism hashes the library's exports and places them into this table. When a library is unloaded, the mechanism looks up the library's exports in the table and removes them.
The hash table does not contain entries for symbols defined by shl_definesym().
With the global symbol table, the dynamic loader may need to perform a large number of hashing operations to locate symbols. Performing this hash function may cost considerable time, especially when symbol names are very long (C++ programs). To speed up dld, computing hash values can be
Use the +gst options, +gst, +gstbuckets
With these options, you can tune the size of the hash table and number of buckets per entry to reach a balance of performance and memory use. To maximize for performance, tune the table size for an average chain length of one. For maximum memory use, at the expense of performance, tune the size of the table to minimize the number of empty entries. In general, use prime numbers for the table size. The mechanism provides default values of table size, 1103, and number of buckets, 3.
To get statistical information about hash table performance, set the environment variable
_HP_DLDOPTS to contain
•Operation (load/unload)
•Name of library
•Name of library
•Number of exports
•Number of entries in table with no stored symbols
•Average length of
•Calculated performance of the hash table
•Amount of memory used by the hash table
Improving Performance by Optimizing the Hash Table Size
The
The
The
The
The
Improving Performance by Optimizing the Hash Table Size 221