SH profiling redux
Kris Warkentin
kewarken@qnx.com
Tue Mar 26 11:36:00 GMT 2002
Well, I tried a few more test cases and it looks like profiling is working
more or less alright. I'm still getting the 'no call graph' data thing on
some apps but that may be something to do with our mcount.
The compiler blows up on this file - I've put the error messages afterwards:
#include <iostream>
int
main()
{
std::cout << "Hello World!" << std::endl;
return 0;
}
/usr/lib/gcc-lib/ntosh/2.95.3/cpp0 -nostdinc -nostdinc++ -D__cplusplus -D__Q
NX__ -D__QNXNTO__ -D__GNUC__=2 -D__GNUC_MINOR__=95 -D__GNUG__=2 -D__unix__ -
D__unix -D__ELF__ -D__SH__ -D__SH4__ -D__sh__ -D__LITTLEENDIAN__ -Asystem(un
ix) -Asystem(nto) -Asystem(qnx) -Asystem(qnxnto) -idirafter /usr/include -I
/usr/include/cpp -lang-c++ hello.cc -o - | \
/usr/lib/gcc-lib/ntosh/2.95.3/cc1plus -g2 -quiet -fno-builtin -fhonor-std -f
no-default-inline -p -m4 -ml -dumpbase hello.cc -o - | \
/usr/bin/ntosh-as -little -o /tmp/AAA104240_cc.o
/usr/include/cpp/xstring: In method `class std::_Ptrit<char,int,char *,char
&,char *,char &>
std::basic_string<char,std::char_traits<char>,std::allocator<char>
>::begin()':
/usr/include/cpp/xstring:337: instantiated from
`std::basic_string<char,std::char_traits<char>,std::allocator<char>
>::assign(const char *, const char *)'
/usr/include/cpp/xlocinfo:149: instantiated from here
/usr/include/cpp/xstring:659: Internal compiler error.
/usr/include/cpp/xstring:659: Please submit a full bug report.
/usr/include/cpp/xstring:659: See
<URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
cc: /usr/lib/gcc-lib/ntosh/2.95.3/cc1plus error 33
{standard input}: Assembler messages:
{standard input}:2853: Warning: end of file not at end of a line; newline
inserted
{standard input}:2934: Error: missing operand
{standard input}:2934: Error: invalid operands for opcode
cc: /usr/bin/ntosh-as error 1
cc: unlinking /tmp/AAA104240_cc.o
We're using the Dinkum headers. If anyone is interested, I'll post the
assembly output as well. It's definitely my profiled stuff that's causing
it since it works fine without -p but I'm not sure what's wrong with what is
being emitted.
cheers,
Kris
----- Original Message -----
From: "Stephen Clarke" <Stephen.Clarke@st.com>
To: <kewarken@qnx.com>
Cc: <gcc@gcc.gnu.org>
Sent: Monday, March 25, 2002 9:42 PM
Subject: Re: SH profiling redux
> kewarken@qnx.com wrote:
>
> > #define MCOUNT \
> > __asm__(".globl _mcount\n" \
> > "_mcount:\n" \
> > "mov.l __mcount_addr,r1\n" \
> > "mov.l @(4,r15),r3\n" \
> > "mov.l r4,@-r15\n" \
> > "mov.l r5,@-r15\n" \
> > "mov.l r6,@-r15\n" \
> > "mov.l r7,@-r15\n" \
> > "sts pr,r5 \n" \
> > "mov r3,r4 \n" \
> > "add #4,r5 \n" \
> ^^^
> Are you sure this inst is correct - I can't stop myself from thinking
> it ought to be "add #6,r5" ...
>
> > [...]
>
> Steve.
> --
> Stephen Clarke, Principal Engineer, SuperH Inc.
> Phone:1-408-922-4062, Fax:1-408-954-8507, mailto:Stephen.Clarke@st.com
> Mail: SuperH Inc., 3801 Zanker Rd., San Jose, CA 95134, USA.
>
More information about the Gcc
mailing list