Using --gdb flag will cause so many differences in my case. I didn't have any problem with running C programs.
When I run sniper with a C program, without --gdb the outputs were fine, but when I use --gdb, the
sim.out file is empty!
This is the output when I used --gdb for a C program:
[SNIPER] StartRunning /home/hesam/Desktop/sniper-3.06/pin_kit/ia32/bin/pinbin -mt -injection child -xyzzy -enable_vsm 0 -pause_tool 1 -t /home/hesam/Desktop/sniper-3.06/lib/pin_sim -c /home/hesam/Desktop/sniper-3.06/config/base.cfg --general/total_cores=2 --general/output_dir=/home/hesam/Desktop/sniper-3.06/output_files/ --config=/home/hesam/Desktop/sniper-3.06/config/nehalem.cfg --config=/home/hesam/Desktop/sniper-3.06/config/gainestown.cfg -- /home/hesam/Desktop/a.out
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 562, in <module>
main()
File "/usr/lib/python2.7/site.py", line 544, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib/python2.7/site.py", line 271, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib/python2.7/site.py", line 246, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib/python2.7/site.py", line 236, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib/python2.7/sysconfig.py", line 558, in get_config_var
return get_config_vars().get(name)
File "/usr/lib/python2.7/sysconfig.py", line 457, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib/python2.7/sysconfig.py", line 303, in _init_posix
makefile = _get_makefile_filename()
File "/usr/lib/python2.7/sysconfig.py", line 297, in _get_makefile_filename
return os.path.join(get_path('platstdlib').replace("/usr/local","/usr",1), "config" + (sys.pydebug and "_d" or ""), "Makefile")
AttributeError: 'module' object has no attribute 'pydebug'
[SNIPER] End[SNIPER] Elapsed time: 0.18 seconds
Traceback (most recent call last):
File "./run-sniper", line 447, in <module> gen_simout.generate_simout(resultsdir = outputdir, output = open(simoutfile, 'w'), silent = True) File "./tools/gen_simout.py", line 9, in generate_simout res = sniper_lib.get_results(jobid = jobid, resultsdir = resultsdir) File "./tools/sniper_lib.py", line 25, in get_results results = parse_results_from_dir(resultsdir, partial = partial) File "./tools/sniper_lib.py", line 252, in parse_results_from_dir return parse_results_from_fileobjs(files, partial = partial) File "./tools/sniper_lib.py", line 151, in parse_results_from_fileobjs simcfg = parse_config(simcfg.read())AttributeError: 'NoneType' object has no attribute 'read'Resuming
[SNIPER] Enabling performance models
[SNIPER] Setting instrumentation mode to DETAILED
[SNIPER] Disabling performance models[SNIPER] Leaving ROI after 7.48 seconds[SNIPER] Simulated 0.2M instructions @ 24.9 KIPS (12.4 KIPS / target core - 80391.7ns/instr)[SNIPER] Setting instrumentation mode to FAST_FORWARDAs you see, the lines that I have highlighted in green, are the same as the lines in the output of my Java program, and you see the line which is highlighted in yellow is the same AttributeError which I posted yesterday.
The lines which were not among the command line outputs of Java program are highlighted in blue. And there you see an orange line indicating another AttributeError which may cause
sim.out to be empty.
The strange thing is that, there didn't exist a line similar to
Simulated 0.2M instructions @ 24.9 KIPS (12.4 KIPS / target core - 80391.7ns/instr) among Java program outputs. It seems to me that sniper simulator may have crashed or something or finished in an abnormal way.