+static unsigned long lttng_userspace_probe_location_tracepoint_hash(
+ const struct lttng_userspace_probe_location *location)
+{
+ unsigned long hash = hash_key_ulong(
+ (void *) LTTNG_USERSPACE_PROBE_LOCATION_TYPE_TRACEPOINT,
+ lttng_ht_seed);
+ struct lttng_userspace_probe_location_tracepoint *tp_location =
+ container_of(location, typeof(*tp_location), parent);
+
+ hash ^= hash_key_str(tp_location->probe_name, lttng_ht_seed);
+ hash ^= hash_key_str(tp_location->provider_name, lttng_ht_seed);
+ hash ^= hash_key_str(tp_location->binary_path, lttng_ht_seed);
+ /*
+ * No need to hash on the fd. Worst comes to worse,
+ * the equal function will discriminate.
+ */
+ return hash;
+}
+