db: function with too many pointers to it cause slow down
commitf28e8d607f8dd8d5bc56e11706711935235b6a31
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 14 Apr 2014 09:57:36 +0000 (14 12:57 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 14 Apr 2014 09:57:36 +0000 (14 12:57 +0300)
tree5226f6dd0118338d1285243478cc166ef9226f15
parent9357d9fc17ebb9aacf5c466aff42c519bcaa359d
db: function with too many pointers to it cause slow down

If a function is called too many times then we ignore the callers instead
of trying to merge all the information together.  But the situation here is
that the function had over a thousand pointers to it and it was trying to
merge them all together.

$ smdb fn_ptr blk_add_trace_rq_complete | sed -e 's/\,/\n/g' | wc -l
1813

We have to check the number of pointers before doing get_direct_callers()
so I merged get_function_pointer_callers() into match_data_from_db().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_db.c