db/fill_db_caller_info.pl: fix "too common function" code
commitc140103a707dc5a68175cf2591120c603c6db28c
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 12 Jun 2023 12:49:56 +0000 (12 15:49 +0300)
committerDan Carpenter <dan.carpenter@linaro.org>
Mon, 12 Jun 2023 12:50:25 +0000 (12 15:50 +0300)
treeecad731f07729d7a132e077dceb68cdd9633e167
parent89bbf415a3c5d73e8d7dfad66d0cc02ca810a6c3
db/fill_db_caller_info.pl: fix "too common function" code

The code here is supposed to record when a function is too common to the
point where it's not useful to record all the caller data.  For example,
trying to make sense out of all the places which call kmalloc() would does
not scale.

Unfortunately this code was broken when I converted smatch to use hashes
of the file names instead of actual filenames so it no longer recorded
any functions as being too common.

What that ended up doing is that when we were parsing the caller_data we
would quickly run out of resources.  Then we would fake a "I don't know
anything" return.

This code has been broken for a while.  How I noticed the bug is that
mutex_lock() is a sleeping function but the SLEEP wasn't being recorded in
the database so it was not warning about functions that sleep while holding
a spinlock.

Update the sample output to show how hashed filenames look like as well.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
smatch_data/db/fill_db_caller_info.pl