This is way OT for linux-kernel, but here goes:
If you application runs for a very short amount of time (say, less than a
second) the profile will probably be dominated by glibc startup, application
initializations and exit routines. It's useless. That you don't have
time accumulated is the least of your problems - even with the times, your
profile would be random numbers and random function names.
In order to profile *anything* - you should make sure that it runs for a while
(I would say minutes at least, but it depends very much on the complexity of
your application, eg. number of functions involved, and how their run-time is
affected by data input and the environment (timing-sensitive threaded
applications etc.)). You simply need a good data sample, otherwise any data
you have will be dominated by noise, and your profile will be random.
If it's a very small computational routine, simply put it in a
for (int i = 0; i != 100000; i++) { ... }
--
................................................................
: jakob@unthought.net : And I see the elder races, :
:.........................: putrid forms of man :
: Jakob Østergaard : See him rise and claim the earth, :
: OZ9ABN : his downfall is at hand. :
:.........................:............{Konkhra}...............:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/