Slashdot Mirror


Tools for Analyzing C++ Class Code Generation?

Milo_Mindbender submits this query: "I've got a midsize Linux project which uses a lot of STL and other C++ template code. Even considering this, I end up with a lot bigger text (generated code) segment than expected. I know the information about the amount of code generated for each class is in the objdump, but prying it out by hand is a problem when you get five line long template invocations and hundreds of methods to wade through. Can anyone can recommend some tools that analyze binary or objdump output and summarize the amount of code generated for each class, including each unique template or STL class?"

2 of 48 comments (clear)

  1. STL: that bad? by cronie · · Score: 2, Insightful

    Just wanted to bring your kind attention to this amazing fact: everyone tries to handle STL code bloat, is looking for a (inexistent) STL debugging tool, suggests to completely re-design compiling principles just to make STL compile a bit better, writes books about good STL coding (how to make your binary 3 times smaller), rends the air by saying "do you know what 'S' means in STL????" (one of slashdot postings)...

    So why use it at all? Just because it is standard? Then go program with Fortran or Ada, they are pretty standardized, yet almost completely useless/impractical. And so STL.

    (Ah... forgot this: IMO, IMO, IMHO, IMVHO, IMVVHO)

    Huh? No?

  2. Yes, but... by Nicolay77 · · Score: 3, Insightful

    I've seen template bloat in a lot of places, but MI bloat?

    Just because something can be done in the language doesn't mean everybody just goes and uses it. You're right that MI is too prone to mistakes, and it can be replaced most of the time by java-like interfaces.

    I use C++ because is deterministic, can be used to really big proyects, when it runs is fast as hell (can be faster than C when using inline functions), and because I don't use every shitty feature of the language just because it's there. The right tool for the job can be a subset of C++.

    --
    We are Turing O-Machines. The Oracle is out there.