Sorry for the slow reply... I suddenly had a dreadful thought I might have
been been checking the wrong files... (I've been using the callgrind file
format for other purposes)

But I have double checked and the problem is real.

I'm using Ubuntu Lucid and Trusty on 64bit with valgrind-3.10.0.SVN and a
fresh built  valgrind-3.10 from source.

I have been using options

valgrind --tool=callgrind --collect-jumps=yes  --toggle-collect=main
--collect-atstart=no --compress-strings=no --compress-pos=no

Many jcnd lines do seem to follow the
   jcnd=<followed_count>/<total_count>
pattern, but many don't. (An assertion check in callgrind/dump.c:
fprint_jcc may be the best way of catching the cases that don't.)


The attached ruby script  hunts for cases in a folder full of callgrind
outputs.

   - scans from current working directory recursively
   - for callgrind outputs
   - Runs objdump -S -l on the program specified in the cmd: line of the
   callgrind file.
   - picks up fl= lines
   - finds jcnd lines  where followed count > total count
   - picks up the line number from the following line
   - if the file indicated by the fl= line exists, reads that in and
   outputs the relevant line from the callgrind output and the sourcefile.

I poked at the possibility that it was arising in multithreaded programs,
but managed to prove it also arises in single threaded.

I tried extending the simwork.c test to have every flavour of C conditional
expression I could think of, alas, no.

I tried creating a reduced example by taking out superflous stuff, but it
is fragile.. depending on the heaps of stuff that calls the thing that
branches.

I'm trying... without success so far, to create a small test case that
doesn't include piles and piles of our code.


Any suggestions for me to try?



On Thu, Oct 9, 2014 at 8:06 AM, Josef Weidendorfer <
josef.weidendor...@gmx.de> wrote:

> Am 26.09.2014 um 04:35 schrieb John Carter:
> > I would assume then that
> >     followed_count <= total_count
> > would always be true.
> >
> > This one liner....
> >
> > find -name '*.callgrind' | xargs grep jcnd | ruby -nle 'p [$1, $2,$_] if
> > ($_ =~ /jcnd=([0-9]+)\/([0-9]+)/) && ($1.to_i > $2.to_i)'
> >
> > ...finds thousands of counterexamples,
>
> That should not happen. On which architecture, which Valgrind version?
> Can you send me the binary?
>
> Josef
>
>  and if I swap '>'  to '<'.... I
> > find thousands of examples again.
> >
> > So I have concluded I don't understand what followed_count and
> > total_count mean.
> >
> > What do they mean?
> >
> > --
> > John Carter
> > Phone : (64)(3) 358 6639
> > Tait Electronics
> > PO Box 1645 Christchurch
> > New Zealand
> >
> >
> > ------------------------------------------------------------------------
> > This email, including any attachments, is only for the intended
> > recipient. It is subject to copyright, is confidential and may be the
> > subject of legal or other privilege, none of which is waived or lost by
> > reason of this transmission.
> > If you are not an intended recipient, you may not use, disseminate,
> > distribute or reproduce such email, any attachments, or any part
> > thereof. If you have received a message in error, please notify the
> > sender immediately and erase all copies of the message and any
> attachments.
> > Unfortunately, we cannot warrant that the email has not been altered or
> > corrupted during transmission nor can we guarantee that any email or any
> > attachments are free from computer viruses or other conditions which may
> > damage or interfere with recipient data, hardware or software. The
> > recipient relies upon its own procedures and assumes all risk of use and
> > of opening any attachments.
> > ------------------------------------------------------------------------
> >
> >
> >
> ------------------------------------------------------------------------------
> > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> >
> >
> >
> > _______________________________________________
> > Valgrind-users mailing list
> > Valgrind-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/valgrind-users
> >
>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> Valgrind-users mailing list
> Valgrind-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
>



-- 
John Carter
Phone : (64)(3) 358 6639
Tait Electronics
PO Box 1645 Christchurch
New Zealand

-- 

------------------------------
This email, including any attachments, is only for the intended recipient. 
It is subject to copyright, is confidential and may be the subject of legal 
or other privilege, none of which is waived or lost by reason of this 
transmission.
If you are not an intended recipient, you may not use, disseminate, 
distribute or reproduce such email, any attachments, or any part thereof. 
If you have received a message in error, please notify the sender 
immediately and erase all copies of the message and any attachments.
Unfortunately, we cannot warrant that the email has not been altered or 
corrupted during transmission nor can we guarantee that any email or any 
attachments are free from computer viruses or other conditions which may 
damage or interfere with recipient data, hardware or software. The 
recipient relies upon its own procedures and assumes all risk of use and of 
opening any attachments.
------------------------------

Attachment: callgrind_glitch.rb
Description: application/ruby

------------------------------------------------------------------------------
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to