Hi Pritha,
If you are writing this to disk, then I'm quite sure opt will serve you
absolutely fine, don't you think?
We have a bunch of ongoing work aiming to enable packet and instruction tracing
into binary output using Google protocol buffers. I hope to post a patch for
this within a few weeks. By using Google's protocol buffers we more or less
automatically get the parser/serializer/compression and ability to interface
with Java and Python as well as C++.
Andreas
From: [email protected] [mailto:[email protected]] On
Behalf Of Pritha Ghoshal
Sent: 05 July 2012 17:07
To: gem5 users mailing list
Subject: [gem5-users] Printf and Fprintf issue in GEM5
Hi,
I am trying to generate a packet trace file from within GEM5. Every time a
packet is transmitted, I am writing the information into a file and also
printing to the screen. I used printf and fprintf for these as I wanted to use
gem5.fast which does not support DPRINTF. But I face some issues with this.
The printf shows the last 10 lines as:
tail /tmp/pritha/firewall_equ2_co_1000_20_150000
138755
138762
138852
138853
138854
138855
138856
138857
138859
138
The last line is not complete.. The fprintf shows:
tail /tmp/pritha/firewall_co_1000_op_20_150000
0 9680731166 1 2 147945 52
0 9681118640 1 2 148034 67
0 9681541226 1 2 148036 52
0 9681970586 1 2 148037 52
0 9682164968 1 2 148038 1500
0 9682465576 1 2 148039 52
0 9683138086 1 2 148043 52
0 9683565390 1 2 148045 52
0 9683988566 1 2 148047 52
0 9684415204 1 2 148048
Again the last line is not complete, but the fifth column number should match
the printf number.. The fprintf has a much higher number than the one shown in
printf. How should I fix this? I have the printf line in the same place as I
had the DPRINTF and the DPRINTF used to work properly.
Thanks,
Pritha
-- IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended recipient,
please notify the sender immediately and do not disclose the contents to any
other person, use it for any purpose, or store or copy the information in any
medium. Thank you.
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users