On Thu, Jun 25, 2015 at 12:05:24AM +0200, Rasmus Villemoes wrote: > Hi Dan > > If and when you have time, can I get you to look at my misc_tweaks > branch on github? > <https://github.com/Villemoes/smatch/tree/misc_tweaks>. It is > work-in-progress, but I'd like to hear if you hate it (or parts thereof) > before doing more of the performance improvements. "At least in my test, the fill_db_sql.pl part of create_db.sh went from ~5 minutes to a bit under 3 minutes." Nice. My DB takes an hour to build... Looks good. I will apply all these, test them out and push later. I'll take these as-is, but could you use the Signed-off-by tag in future patches? > > Btw, I noticed that for a few source files, smatch takes several > minutes to run, even though the average is around 1 second. Do you > happen to know why? (In particular, should I look in smatch or sparse > code). It's the Smatch code at fault. There have always been some files which take over a minute to parse but there may be a regression here as well... The normal causes of slow parsing are massive switch statements and complicated logging macros. Or logging macros with switch statements in them... Every time there is a merge with one state different then we need to create a new copy of the list of states (the stree) for both sides of the merge. Hm... I maybe could put the logging macros in smatch_data/kernel.ignored_macros. That file is normally for things like WARN_ON(foo >= ARRAY_SIZE). When Smatch sees the WARN_ON() it thinks the condition is possibly true, but the author meant that the condition is never true. It causes a lot of false positives. But if we ignored the big logging functions it might speed things up. I just have to remember which files were problematic... If you want to add a hard timeout option (we have been checking this file for 1 minute, give up) that's fine with me. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe smatch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html