825a497c7307cae8457772c58719f7fe06b28f68
8 if (!defined($warns)) {
9 print "usage: $0 <warns.txt>\n";
13 my $db = DBI
->connect("dbi:SQLite:smatch_db.sqlite", "", "", {AutoCommit
=> 0});
14 $db->do("PRAGMA synchronous = OFF");
15 $db->do("PRAGMA cache_size = 800000");
16 $db->do("PRAGMA journal_mode = OFF");
18 $db->do("delete from function_ptr;");
20 open(WARNS
, "<$warns");
22 if (!($_ =~ /info: sets_fn_ptr /)) {
26 # kernel/ksysfs.c +87 (null)(87) info: sets_fn_ptr '(struct kobj_attribute)->show' 'profiling_show'
30 my ($file_and_line, $file, $dummy, $struct_bit, $func, $ptr);
31 ($file_and_line, $dummy, $dummy, $dummy, $struct_bit, $ptr, $func) = split(/ /, $_);
32 ($file, $dummy) = split(/:/, $file_and_line);
34 if (!defined($func)) {
37 if (!($struct_bit =~ /^'\(struct$/)) {
40 if (!($func =~ /^'[\w_]+'$/)) {
48 $db->do("insert into function_ptr values ('$file', '$func', '$struct_bit $ptr')\n");