I'm debugging some legacy javascript that has some freezes when executing. I've been at it for days and am making no progress. I need to be able to identify which functions are causing the freezes, and using the browser's debugging tools just isn't working. 

Ideally, I'd like to be able to log the name of a function to the console when it's called, but I've got hundreds of functions, and don't want to manually add console.log statements to each one. 

Is it possible to modify the function prototype or something so that it will log it's own name?