Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\tracing_map.c Create Date:2022-07-28 12:07:42
Last Modify:2020-03-17 19:44:05 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:detect_dups

Proto:static void detect_dups(struct tracing_map_sort_entry **sort_entries, int n_entries, unsigned int key_size)

Type:void

Parameter:

TypeParameterName
struct tracing_map_sort_entry **sort_entries
intn_entries
unsigned intkey_size
952  dups = 0 , total_dups = 0
956  If n_entries < 2 Then Return
959  sort(sort_entries, n_entries, size of * , (int( * )(constvoid * , constvoid * ))cmp_entries_dup, NULL)
962  key = key
963  When i < n_entries cycle
964  If Not memcmp(key, key, key_size) Then
965  dups++
965  total_dups++
966  Continue
968  key = key
969  dups = 0
972  WARN_ONCE(total_dups > 0, "Duplicates detected: %d\n", total_dups)
Caller
NameDescribe
tracing_map_sort_entriesracing_map_sort_entries - Sort the current set of tracing_map_elts in a map*@map: The tracing_map*@sort_key: The sort key to use for sorting*@sort_entries: outval: pointer to allocated and sorted array of entries* tracing_map_sort_entries() sorts the