Gettting statistics/profile of c program in linux


 
Thread Tools Search this Thread
Top Forums Programming Gettting statistics/profile of c program in linux
# 1  
Old 10-17-2005
Gettting statistics/profile of c program in linux

HI,

In unix we can get profile on a c program like this [I got this from forum only Smilie-]::

cc -g -p -o cpp_sw_gsmconverter_shailesh5 cpp_sw_gsmconverter_shailesh5.c

prof cpp_sw_gsmconverter_shailesh5

In the same manner how can I collect statistics in linux using gcc command. [gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)]

Thanks in advance.
# 2  
Old 10-17-2005
Code:
gcc -pg -Wall myfile.c -o ./myfile
# run myfile
./myfile
# generate the profile
gprof ./myfile

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Gettting error while executing script

getting error as below while executing script in linux. OS version: Linux VGP-3GPSDB-LX 3.10.0-514.el7.x86_64 #1 SMP Wed Oct 19 11:24:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux ./imxtract.sh: line 395: unexpected EOF while looking for matching ``' ./imxtract.sh: line 402: syntax error:... (1 Reply)
Discussion started by: Riverstone
1 Replies

2. Shell Programming and Scripting

Not gettting target output using this

i=1 out="_" while do j=0 IN="" while do IN="|"$IN j=`expr $j + 1` done print -n $IN$out i=`expr $i + 1` done Actual O/P: |_||_|||_||||_|||||_Expected O/P: |_ | |_ | | |_ | | | |_ (3 Replies)
Discussion started by: targetshell
3 Replies

3. Red Hat

Ftp gettting disconnected

All, Trying to ftp to a remote ftp server. See following output: ftp -dv xx.xx.xx.xx Connected to xx.xx.xx.xx (xx.xx.xx.xx). 220 Microsoft FTP Service Name (xx.xx.xx.xx:username): ftpuser ---> USER ftpuser 331 Password required for ftpuser. Password: ---> PASS XXXX 230 User logged... (1 Reply)
Discussion started by: Tommyk
1 Replies

4. Shell Programming and Scripting

Edit .profile to connect to Oracle- Linux 2.6.9-89

Hi, I want to connect to sqlplus through unix. I got the command to do it. But I was getting error: ./executeSQL.ksh: sqlplus: not found Then when I googled I found that we have to include Oracle Client path in .profile file. I don't know how to do it. Also I don't have permissions to... (2 Replies)
Discussion started by: dips_ag
2 Replies

5. Infrastructure Monitoring

trap in etc/profile and user .profile

Hello I really wonder what's trap in etc/profile and in each user .profile. I try to google for it but I think I have no luck. Mostly hit is SNMP traps which I think it is not the same thing. I want to know ... 1. What's a "trap 2 3" means and are there any other value I can set... (4 Replies)
Discussion started by: Smith
4 Replies

6. Linux

where to find statistics about Linux installation in the telco industry

Hello all do you know where i can find statistics on how much Linux installations are in the Telco or any industry thanks (0 Replies)
Discussion started by: umen
0 Replies

7. UNIX for Dummies Questions & Answers

Gettting unix.

Where should I go(the site) to get unix? Please tell me! (1 Reply)
Discussion started by: Katan
1 Replies

8. UNIX for Dummies Questions & Answers

gettting disk info from console

Hi all, can someone tell me the easiest was to get disk info from a console. I manage headless servers, and would like to collect the specs on hard drives installed without looking it up through Sun. The boot messages only tell me the size/name e.g. 'Sun36G' I want to know the rotation... (1 Reply)
Discussion started by: mintzy
1 Replies

9. Cybersecurity

Gettting multiple logwatch mails

Hi Guys... I have a problem of getting multiple LogWatch mails from my box. I have a cron setup to send me (and some other users) Logwatch report mail form our server. I end up getting multiple mails from all the boxes (other users have not complained of this). I cannot figure out why. I... (0 Replies)
Discussion started by: skotapal
0 Replies

10. UNIX for Dummies Questions & Answers

changed .profile but didnt ./.profile, yet reflected changes

hi , i added ls -F to .profile. and i need to do ./.profile for the effect to take effect BUT i didnt and YET the next day when i came to work and log in, the changes took effect. i am on aix. please explain.. thanks (4 Replies)
Discussion started by: yls177
4 Replies
Login or Register to Ask a Question