[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: g++ and library optimisations
From: |
Paul Pluzhnikov |
Subject: |
Re: g++ and library optimisations |
Date: |
Mon, 14 May 2007 09:21:07 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) |
pemo <peet.morris@gmail.com> writes:
> Could you clarify it's neither a .h/.cpp?
The file is called 'vector' (there is no .h or .cpp extention).
It contains something like this:
#ifndef _GLIBCXX_VECTOR
#define _GLIBCXX_VECTOR 1
#pragma GCC system_header
#include <bits/functexcept.h>
#include <bits/stl_algobase.h>
#include <bits/allocator.h>
#include <bits/stl_construct.h>
#include <bits/stl_uninitialized.h>
#include <bits/stl_vector.h>
#include <bits/stl_bvector.h>
#ifndef _GLIBCXX_EXPORT_TEMPLATE
# include <bits/vector.tcc>
#endif
#ifdef _GLIBCXX_DEBUG
# include <debug/vector>
#endif
#endif /* _GLIBCXX_VECTOR */
The majority of vector implementation "lives" in vector.tcc.
> The source code behind the
> vector template has to be compiled, and thus found. Intuitively, I
> would expect this be be in some include path, i.e., as vector is
> included in her source, the template boiler plate has also to be
> 'included' somehow.
It is included, just not from 'vector.h'.
>> You seem to be lacking the necessary skills to help her with
>> profiling. As I said, it may require a bit of wizardry.
>
> Yes I am - used to selecting a simple checkbox to say I'd like to
> profile some code, and being shown VTune output [I have the Intel
> compiler for Windows [not that VTune requires that of course]].
You do realize that there is a VTune for Linux?
It may provide significantly better results then gprof, and you
are familiar with it, so you may have an easier time overall.
>> Suggestion: compile a simple application (main with a couple of
...
> Ok, but can you say whether after doing this [away from her machine at
> the mo] whether gprof requires some explicit input, e.g. gprof a.out?
Yes -- it requires you to supply image name (unless that image is
called 'a.out') and the profile output (unless it's called 'gmon.out').
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.