Re: [CentOS] Where is the Centos Linux 5.5 kernel syscall handler for mmap? (Keith Roberts)

2011-05-29 Thread Frank Chang

Keith Roberts, Thank you for your suggestion about doing a grep of the 
source code. We found mmap.S in ../sysdeps/unix/sysv/linux/i386. We looked in 
mmap.S and found a lot of assembly code. Could you please tell us if any of the 
assembly code call the kernel syscall handler for mmap.s?
 Also, we ran make for the kernel Makefile and we obtained the following 
result shown below. Could you please suggest us how to fix the kernel 
Makeconfig so that it skips over libc_pic.os? Thank you for your help. 
 
 
 
gcc -shared -static-libgcc -Wl,-O1 -Wl,-z,defs -Wl,
-dynamic-linker=/home/frankc/DQT1/glibc-2.9/lib/ld-linux.so.2 
-B/home/frankc/DQTTest5/csu/ -Wl,
--version-script=/home/frankc/DQTTest5/libc.map 
-Wl,-soname=libc.so.6 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both 
-nostdlib -nostartfiles -e __libc_main 
-L/home/frankc/DQTTest5 -L/home/frankc/DQTTest5/math 
-L/home/frankc/DQTTest5/elf -L/home/frankc/DQTTest5/dlfcn 
-L/home/frankc/DQTTest5/nss 
-L/home/frankc/DQTTest5/nis -L/home/frankc/DQTTest5/rt 
-L/home/frankc/DQTTest5/resolv 
-L/home/frankc/DQTTest5/crypt -L/home/frankc/DQTTest5/nptl -Wl,
-rpath-link=/home/frankc/DQTTest5:/home/frankc/DQTTest5/math:/home/frankc/DQTTest5/elf:
/home/frankc/DQTTest5/dlfcn:/home/frankc/DQTTest5/nss:/home/frankc/DQTTest5/nis:
/home/frankc/DQTTest5/rt:/home/frankc/DQTTest5/resolv:/home/frankc/DQTTest5/crypt:
/home/frankc/DQTTest5/nptl -o /home/frankc/DQTTest5/libc.so 
-T /home/frankc/DQTTest5/shlib.lds /home/frankc/DQTTest5/csu/abi-note.o 
/home/frankc/DQTTest5/elf/soinit.os /home/frankc/DQTTest5/libc_pic.os /
home/frankc/DQTTest5/elf/sofini.os /home/frankc/DQTTest5/elf/interp.os 
/home/frankc/DQTTest5/elf/ld.so -lgcc
/home/frankc/DQTTest5/libc_pic.os: In function `__libc_fork':
/home/frankc/DQT1/glibc-2.9/posix/../nptl/sysdeps/unix/sysv/linux/i386/../fork.c:79:
 undefined reference to `__sync_bool_compare_and_swap_4'
/home/frankc/DQTTest5/
gcc -shared -static-libgcc -Wl,-O1 -Wl,-z,defs -Wl,
-dynamic-linker=/home/frankc/DQT1/glibc-2.9/lib/ld-linux.so.2 
-B/home/frankc/DQTTest5/csu/ -Wl,
--version-script=/home/frankc/DQTTest5/libc.map 
-Wl,-soname=libc.so.6 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both 
-nostdlib -nostartfiles -e __libc_main 
-L/home/frankc/DQTTest5 -L/home/frankc/DQTTest5/math 
-L/home/frankc/DQTTest5/elf -L/home/frankc/DQTTest5/dlfcn 
-L/home/frankc/DQTTest5/nss 
-L/home/frankc/DQTTest5/nis -L/home/frankc/DQTTest5/rt 
-L/home/frankc/DQTTest5/resolv 
-L/home/frankc/DQTTest5/crypt -L/home/frankc/DQTTest5/nptl -Wl,
-rpath-link=/home/frankc/DQTTest5:/home/frankc/DQTTest5/math:/home/frankc/DQTTest5/elf:
/home/frankc/DQTTest5/dlfcn:/home/frankc/DQTTest5/nss:/home/frankc/DQTTest5/nis:
/home/frankc/DQTTest5/rt:/home/frankc/DQTTest5/resolv:/home/frankc/DQTTest5/crypt:
/home/frankc/DQTTest5/nptl -o /home/frankc/DQTTest5/libc.so 
-T /home/frankc/DQTTest5/shlib.lds /home/frankc/DQTTest5/csu/abi-note.o 
/home/frankc/DQTTest5/elf/soinit.os /home/frankc/DQTTest5/libc_pic.os /
home/frankc/DQTTest5/elf/sofini.os /home/frankc/DQTTest5/elf/interp.os 
/home/frankc/DQTTest5/elf/ld.so -lgcc
/home/frankc/DQTTest5/libc_pic.os: In function `__libc_fork':
/home/frankc/DQT1/glibc-2.9/posix/../nptl/sysdeps/unix/sysv/linux/i386/../fork.c:79:
 undefined reference to `__sync_bool_compare_and_swap_4'
/home/frankc/DQTTest5/libc_pic.os: In function `__nscd_drop_map_ref':
/home/frankc/DQT1/glibc-2.9/nscd/nscd-client.h:320: undefined reference to 
`__sync_fetch_and_add_4'
/home/frankc/DQTTest5/libc_pic.os: In function `nscd_getpw_r':
/home/frankc/DQT1/glibc-2.9/nscd/nscd_getpw_r.c:232: undefined reference to 
`__sync_fetch_and_add_4'
/home/frankc/DQTTest5/libc_pic.os: In function `__nscd_drop_map_ref':
/home/frankc/DQT1/glibc-2.9/nscd/nscd-client.h:320: undefined reference to 
`__sync_fetch_and_add_4'
/home/frankc/DQTTest5/libc_pic.os: In function `nscd_getgr_r':
/home/frankc/DQT1/glibc-2.9/nscd/nscd_getgr_r.c:321: undefined reference to 
`__sync_fetch_and_add_4'
/home/frankc/DQTTest5/libc_pic.os: In function `__nscd_drop_map_ref':
/home/frankc/DQT1/glibc-2.9/nscd/nscd-client.h:320: undefined reference to 
`__sync_fetch_and_add_4'
/home/frankc/DQTTest5/libc_pic.os:/home/frankc/DQT1/glibc-2.9/nscd/nscd_gethst_r.c:400:
 more undefined references to `__sync_fetch_and_add_4' follow
/home/frankc/DQTTest5/libc_pic.os: In function `__nscd_get_map_ref':
/home/frankc/DQT1/glibc-2.9/nscd/nscd_helper.c:431: undefined reference to 
`__sync_val_compare_and_swap_4'
/home/frankc/DQTTest5/libc_pic.os: In function `*__GI___libc_freeres':
/home/frankc/DQT1/glibc-2.9/malloc/set-freeres.c:39: undefined reference to 
`__sync_bool_compare_and_swap_4'
collect2: ld returned 1 exit status
: In function `__nscd_drop_map_ref':
/home/frankc/DQT1/glibc-2.9/nscd/nscd-client.h:320: undefined reference to 
`__sync_fetch_and_add_4'
/home/frankc/DQTTest5/libc_pic.os: In function `nscd_getpw_r':
/home/frankc/DQT1/glibc-2.9/nscd/nscd_getpw_r.c:232: undefined reference to 
`__sync_fetch_and_add_4'

[CentOS] Where is the Centos Linux 5.5 kernel syscall handler for mmap?

2011-05-27 Thread Frank Chang

 Good evening, We are using Centos Linux Release 5.5 x86_32. We wondering where 
the kernel syscall handler for mmap in Centos Linux 5.5 distribution is 
located(for example /usr/xxx/)? Would any programmers or operating system 
administrators have this information? Thank you.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] How to resolve Centos Linux Version 5.5 x86_32 C​allgrind Version 3.6.1 cg_annotat​​​e : Line 1 Missing command line error?

2011-05-24 Thread Frank Chang

Good afternoon, We are running callgrind and
cg_annotate version 3.6.1
on Centos Linux Version 5.5 x86_32. One month ago  Mr. Josef Weidenorfer
issued a special patch that fixed callgrind on Centos Linux Version
5.5 x86_32. We can now profile complex C++ programs which use our own
shared library libmdMatchup.so.
   However, when we use version 3.6.1 cg_annotate
callgrind.out.22533 --auto = yes
-I/home/frankc/DQTTest6/MatchUpLib/Source, we obtain the error.  Line
1 Missing command line. callgrind.out.22533 was
created using the command line:
/home/frankc/DQTTest2/valgrind-3.6.1/coregrind/valgrind
--tool=callgrind --dump-instr=yes --simulate-cache=yes
--collect-jumps=yes ./MatchUpAccurate.exe. MatchUpAccurate.exe uses a
special shared library libmdMatchup.so
Could some engineer or programmer please tell us what we are
doing wrong in using
callgrind and cg_annotate? Please let us know if other
programmers/developers have been able to use cg_annotate version 3.6.1
on Centos Linux Version 5.5 x86_32. I am including the top 50 lines of
Callgrind.out.22533 below in case you have time to look at our
problem.
Thank you.
version: 1
creator: callgrind-3.6.1
pid: 22533
cmd:  ./MatchUpAccurate.exe
part: 1

desc: I1 cache: 16384 B, 32 B, 8-way associative
desc: D1 cache: 8192 B, 64 B, 4-way associative
desc: LL cache: 524288 B, 64 B, 8-way associative
desc: Timerange: Basic block 0 - 1024808
desc: Trigger: Program termination
positions: instr line
events: Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw
summary: 51414468282 24200786461 13006654839 651776228 364795898
154843814 202585 5324012 59432151

ob=(10) /home/frankc/DQTTest6/MatchUpTest/lirh5g_deb/MatchUpAccurate.exe
fl=(20) 
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iostream
fn=(8384) __tcf_0
0x804e2d8 76 1 0 1 1 0 0 1
+1 * 1
+2 * 1 0 1
+1 * 1
+3 * 1 0 1 1
cfi=(14) ???
cfn=(1026) 0x0804f422
calls=1 0x804f422 -76
* * 2 2
+5 * 1
+6 * 1
+6 * 1 0 1
+3 * 1 0 1
cob=(7) /usr/lib/libstdc++.so.6.0.8
cfi=(7) ???
cfn=(8390) std::ios_base::Init::~Init()
calls=1 0x3e30b70 -76
* * 26 12 8 5 3 0 4 3
cob=(1) /lib/ld-2.5.so
cfi=(1) ???
cfn=(176) _dl_runtime_resolve
calls=1 0xae7440 -76
* * 1428 508 202 3 40 5 0 16 3
* * 5 3 2 1 2
+5 * 1
+3 * 1 1
+1 * 1 1
+1 * 1 1
fl=(27) /usr/include/sys/stat.h
fn=(1290) fstat
0x80517e8 448 18 0 18 18 0 0 3
+1 * 18
+2 * 18 0 18  ___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Centos 5.5 mmap.c and mmap hints

2011-05-15 Thread Frank Chang

 Good morning, We are trying to figure out how to properly provide adresss 
hints to mmap on 32-bit Centos 5.5. Does any documentation exist about to how 
to provide address hints to mmap on 32-bit Centos 5.5? If so, where can we find 
this documentation.
 In order to understand mmap better, we decided to try to find the Centos 
5.5 source code for mmap.c. We already installed the kernel source code using 
the following commands : # cd /tmp
# wget 
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/kernel-2.6.18-8.1.8.el5.src.rpm
# rpm -ivh kernel-2.6.18-8.1.8.el5.src.rpm
 
However, we can't find the source code for the functions: void *mmap(void 
*start, size_t length, int prot, int flags, int fd, off_t offset);

and 
int munmap(void *start, size_t length); Where could we obtain the source code 
for the system function: void *mmap(void *start, size_t length, int prot, int 
flags, int fd, off_t offset)? Thank you. 

 
We have already run the following commands  $ su
 # vi /etc/sysctl.conf
...and append
vm.vdso_enabled = 0
vm.mmap_min_addr = 4096
 #
 # /sbin/sysctl -p
...
vm.vdso_enabled = 0
vm.mmap_min_addr = 4096
 # exit
Thank you.
  ___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] opreport version 0.9.4 on Centos Linux 5.5

2011-04-26 Thread Frank Chang

   Nicholas Thierry-Mieg, Thank you for your reply on Saturday Apr 23,2011. 
Since then I have been trying to learn how to use oprofile 0.9.4 on Centos 
Linux 5.5.  If I follow the following steps running as root,
 
opcontrol --shutdown 
opcontrol --callgraph=7 
opcontrol --image=/home/frankc/DQTTest5/MatchUpTest/lirh5g_deb/Mary48.exe 
opcontrol --start 
 
/home/frankc/DQTTest5/MatchUpTest/lirh5g_deb/Mary48.exe  

opcontrol --dump 
opreport -c  profile_info.txt 
or
opreport -l /home/frankc/DQTTest5/MatchUpLib/lirh5g_deb/libmdMatchup.so
 
I obtain the following warning:  
warning: the last modified time of the binary file does not match that of the 
sample file for /home/frankc/DQTTest5/MatchUpLib/lirh5g_deb/libmdMatchup.so
Either this is the wrong binary or the binary has been modified since the 
sample file was created.
warning: the last modified time of the binary file does not match that of the 
sample file for /home/frankc/DQTTest5/MatchUpTest/lirh5g_deb/MatchUpAccurate.exe
 
I am wondering how to prevent this warning message from occuring because it 
indicates our profiling results may be incorrect. Thank you.
 
  ___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Re; Valgrind/Callgrind 3.6.1 does not appear to work on Centos Linux 5.5

2011-04-23 Thread Frank Chang

   Tru Huynh, Thank you for your reply. When I enter uname -a I obtain the 
following output: Linux localhost.localdomain 2.6.18-194.26.1.el5PAE #1 SMP Tue 
Nov 9 13:34:42 EST 2010 i686 i686 i386 GNU/Linux. This information indicates we 
are using x86_32 architecture rather than a x86_64 architecture. Also, when I 
enter rpm -q glibc glibc-devel, I obtain the following output: 
glibc-2.5.49.el5_57  glibc-devel-2.5.49.el5-5.7.
I think we are using a different architecture compared to your x86_64 
architecture. Also , we using a different version of glibc and glibc-devel than 
the versions listed in your reply. 
Please tell us whether our Callgrind errors are caused by a libc mismatch 
and if there is a workaround to this lib mismatch. Thank you.
  ___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] QT and oprofile on Centos Linux 5.5

2011-04-22 Thread Frank Chang

  Philip Schaffner, Thank you for your reply. I guess we will have to wait 
until Centos 6 arrives to get a working QT. Did you see Nicolas Thierry-Mieg's 
response regarding yum install oprofile-gui. We were able to install 
oprofile-guii.i386 0:0.9.4-15.el5.centos and oprofile.i386 
0.0.9.4.15.el.5.centos. Thank you.  ___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] yum install oprofile-gui

2011-04-22 Thread Frank Chang

 Nicolas Thierry-Mieg, We followed your instructions to yum install 
oprofile-gui. We were able to install oprofile-guii.i386 0:0.9.4-15.el5.centos 
and oprofile.i386 0.0.9.4.15.el.5.centos. 
  I was wondering what our next step should be. I tried ./configure 
--with-kernel-support with oprofile-0.9.6 and obtain a warning, a working QT 
not found, no GUI was built. Should we try to build oprofile-0.9.4? If so, how 
steps do have to do install oprofile-0.9.4? Thank you.  
  ___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Valgrind/Callgrind 3.6.1 does not appear to work on Centos Linux 5.5

2011-04-22 Thread Frank Chang

   Hi, For the last day or  two I having been trying to get Valgrind/Callgrind 
3.6.1 to work on Centos Linux 5.5 using a simple Fibonacci C++ program(shown 
below). After compiling the program using g++ -g  -o MatchUpAccurate 
MatchUpAccurate.cpp, we run: 
/home/frankc/DQTTest/valgrind-3.6.1/coregrind/valgrind --tool=callgrind 
--dump-instr=yes --simulate-cache=yes --collect-jumps=yes 
./MatchUpAccurate.exe. Then we get an error message from callgrind(shown below).
 
   A programmer sent me an email showing me that my test program is profiled 
correctly on Ubuntu. I received an email from a programmer yesterday who thinks 
the reason that callgrind is not able to profile my C++ program on Centos Linux 
Version 5.5 is because of an libc conflict. 
what is the version of libc on the host? Is it a vm or physical? I guess 
it is gonna be a ABI/version conflict of libc. If you cannot figure it out, 
just report it. Chances are, a dev will be able to tell you in 5 seconds.
  In order to determine what version of libc is on the Centos Linux 5.5 
host, I tried: rpm -qa | grep glibc. The answer was: glibc-devel-2.5-49.el5_5.7 
glibc-2.5-49.el5_5.7 glibc-headers-2.5-49.el5_5.7 glibc-common-2.5-49.el5.
 
 We were wondering if anyone has been able to run Valgrind/Callgrind 3.6.1 
on Centos Linux 5.5? Thank you.
 
// Callgrind error message
==18130== Callgrind, a call-graph generating cache profiler
==18130== Copyright (C) 2002-2010, and GNU GPL'd, by Josef Weidendorfer et al.
==18130== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==18130== Command: ./MatchUpAccurate.exe
==18130== 
--18130-- warning: Pentium 4 with 12 KB micro-op instruction trace cache
--18130-- Simulating a 16 KB I-cache with 32 B lines
==18130== For interactive control, run 'callgrind_control -h'.
std::ios_base::Init::Init()
BB# 215387
Callgrind: jumps.c:164 (new_jcc): Assertion '(0 = jmp)  (jmp = 
from-bb-cjmp_count)' failed.
==18130== at 0x3801E4C8: report_and_quit (m_libcassert.c:193)
==18130== by 0x3801E69C: vgPlain_assert_fail (m_libcassert.c:267)
==18130== by 0x3800FCD9: vgCallgrind_get_jcc (jumps.c:164)
==18130== by 0x38003534: vgCallgrind_push_call_stack (callstack.c:217)
==18130== by 0x38001FDB: vgCallgrind_setup_bbcc (bbcc.c:844)
==18130== by 0x6292A7E3: ???
sched status:
running_tid=1
Thread 1: status = VgTs_Runnable
==18130== at 0x3E30CB0: std::ios_base::Init::Init() (in 
/usr/lib/libstdc++.so.6.0.8)
==18130== by 0x3EA0125: ??? (in /usr/lib/libstdc++.so.6.0.8)
==18130== by 0x3E22BD0: ??? (in /usr/lib/libstdc++.so.6.0.8)
==18130== by 0xAE2162: call_init (in /lib/ld-2.5.so)
==18130== by 0xAE2272: _dl_init (in /lib/ld-2.5.so)
==18130== by 0xAD484E: ??? (in /lib/ld-2.5.so)
 
// Test program MatchUpTest.cpp 
int fibonacci(int n){
  if (n == 0)
 return 0;
  else if (n == 1)
 return 1;
  else
 return fibonacci(n - 1) + fibonacci(n-2);
}
int main(int Argc_,char *Argv_[]) {
 
 fibonacci(10);
 return 1;
}
  ___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] How to install binutils-devel on Centos Linux 5.5

2011-04-21 Thread Frank Chang

Good morning, I am trying to install binutils-devel on Centos Linux 5.5 so that 
we can obtain lib liberty required by the oprofile-0.9.6 Linux profiler.
  Using root , I enter: yum local install 
binutils-devel-2.20.51.0.7-6.fc14.i686.rpm. Then I get the message: Public key 
for binutils-devel-2.20.51.0.7-6.fc14.i686.rpm is not installed. Please tell me 
where I get the  Public key for binutils-devel-2.20.51.0.7-6.fc14.i686.rpm . 
Thank you.  ___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] How to install binutils-devel on Centos Linux5.5

2011-04-21 Thread Frank Chang

Simon Matter and Ned Slider, Thank you for your answers. This afternoon , I 
installed binutils-devel on Centos Linux 5.5. Then , I installed all the QT 
packages except for the two QT client packages. 
 When I ran ./configure --with-kernel-support on the OProfile Linux 
profiler distribution 0.9.6, I get the warning: a working QT was not found: no 
GUI was built. How do I resolve this issue on Centos Linux 5.5? Thank you.  
   ___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos