Avatar of zizi21
zizi21

asked on 

gprof error message: gprof: unexpected EOF after reading 6/967815337 samples

hi,

i am using grof and i am getting this error message..could any one pls help?
C

Avatar of undefined
Last Comment
zizi21
Avatar of Infinity08
Infinity08
Flag of Belgium image

The obvious question would be : is the file you were trying to read complete ? How big is it ?
Avatar of Infinity08
Infinity08
Flag of Belgium image

Btw, 967815337 is a bit much, no ?
Avatar of zizi21
zizi21

ASKER

yup, but when i did wc text.txt , it is only 26 characters ....

which is the word that i put inside...
Avatar of Infinity08
Infinity08
Flag of Belgium image

>> yup, but when i did wc text.txt , it is only 26 characters ....

That's a bit small to be reading 967815337 records, isn't it ;)

Are you sure that the file format is right for gprof ?
Avatar of zizi21
zizi21

ASKER

is there a specific format ? i am using fread with rb
ASKER CERTIFIED SOLUTION
Avatar of Infinity08
Infinity08
Flag of Belgium image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of zizi21
zizi21

ASKER

ok..looking at it now.thanks..
Avatar of sunnycoder
sunnycoder
Flag of India image

>yup, but when i did wc text.txt , it is only 26 characters ....
>i am using fread with rb

I am kind of lost ... It does not look like you are using gprof correctly. please post the steps - beginning with compilation of your program - that you executed for using gprof.
Avatar of zizi21
zizi21

ASKER

apologies for taking a long time..

i compile with the program with -pg option used with gcc.

i understand there is a bug in the program that my caused it..i am closing the question first..thanks a million
C
C

C is a general-purpose, imperative computer programming language, supporting structured programming, lexical variable scope and recursion, while a static type system prevents many unintended operations. By design, C provides constructs that map efficiently to typical machine instructions, so it has found lasting use in applications that had formerly been coded in assembly language, including operating systems as well as various application software for computers ranging from supercomputers to embedded systems. It is distinct from C++ (which has its roots in C) and C#, and many later languages have borrowed directly or indirectly from C.

23K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo