On Mon, Aug 16, 2010 at 10:10:41AM -0400, sami wagiaalla wrote:
This patch enables the use of custom hash and comparison functions
when adding elements to a bcache. The patch also introduces hash and
comparison functions which take into consideration only the relevant
properties of the psymbol.
This patch makes me nervous because it's violating the invariants of
the bcache. Any time you get a psymbol from the bcache, it is going
to have other fields that were not hashed somewhat random. What are
those ignored fields, and why do they not matter? How about
lifetimes, are they as long-lived as the bcache?
You compare name, value, language, domain, and class. The mangled
name is ignored; this assumes that there is only ever one mangled name
per demangled name, with no documentation of why that's safe to
assume.