Re: [gem5-users] Multiple cache line evictions issue

2019-07-25 Thread Victor Kariofillis
I tried using compression, but I'm getting a segmentation fault error. This
happens regardless to whether I use an AtomicSimpleCPU and atomic mem mode
or TimingSimpleCPU and timing mem mode. The error is the same and occurs
after a WritebackDirty miss to the LLC.

I use the following command to run gem5 in debug mode:
run --debug-flags=Cache,CacheTags,CacheComp configs/example/se.py -c
/home/vic/Documents/tests/simple_array --cpu-type TimingSimpleCPU -n 1
--caches --l1d_size 128B --l1i_size 128B --l2cache --num-l2caches 1
--l2_size 512B --compression --compressor BDI

The error is the following:
Program received signal SIGSEGV, Segmentation fault.
0x01030f92 in __gnu_cxx::__atomic_add (__mem=0x9, __val=1)
at /usr/include/c++/5/ext/atomicity.h:53
53  { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }

If I merge the changes from "Remove writebacks packet list" and don't use
Atomic mode, would that fix the problem?

Thanks

On Wed, 24 Jul 2019 at 16:23, Victor Kariofillis 
wrote:

> Hi,
>
> I am interested in using the cache compression schemes that gem5 has
> (mainly BDI). I was going through the commits and I saw one named "Remove
> writebacks packet list", that was later reverted because it introduced a
> bug in atomic mode. Using a compression scheme will probably result in
> multiple evictions in the case of a writeback. Does this mean that I
> shouldn't use atomic mode along with compressed_tags (i.e. compression) as
> the reverted commit suggests? Is it fine if compression is used in timing
> mode?
>
> Thank you,
> Victor
>
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] MemTraceProbe cannot be imported successfully

2019-07-25 Thread Rosen Lu
I will try.

On Thu, Jul 25, 2019 at 10:23 Abhishek Singh 
wrote:

> Can you try older version of libptotoc like libprotoc 2.6.1?
>
> On Thu, Jul 25, 2019 at 11:18 AM Rosen Lu  wrote:
>
>> Hi,
>>
>> I set the environment as follow:
>>
>> export PATH=$PATH:/usr/local/protobuf/bin
>> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/protobuf/lib
>> export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/protobuf/lib
>>
>> Best,
>> Rosen
>>
>> Serhat Gesoglu  于2019年7月25日周四 上午9:43写道:
>>
>>> Hello,
>>> Could you try locating the protoc bin and setting the environment PROTOC
>>> to it?
>>>
>>> Serhat
>>>
>>> --
>>> *From:* gem5-users [gem5-users-boun...@gem5.org] on behalf of Rosen Lu [
>>> wisdom@gmail.com]
>>> *Sent:* 25 July 2019 15:06
>>> *To:* gem5 users mailing list
>>> *Subject:* Re: [gem5-users] MemTraceProbe cannot be imported
>>> successfully
>>>
>>> Hello Serhat,
>>>
>>> Thank you for your reply. After I rebuilt gem5, the following error
>>> message prompted:
>>> ***
>>> scons: Reading SConscript files ...
>>> Package protobuf was not found in the pkg-config search path.
>>> Perhaps you should add the directory containing `protobuf.pc'
>>> to the PKG_CONFIG_PATH environment variable
>>> No package 'protobuf' found
>>> Warning: pkg-config could not get protobuf flags.
>>> Checking for C header file Python.h... (cached) yes
>>> Checking for C library pthread... (cached) yes
>>> Checking for C library dl... (cached) yes
>>> Checking for C library util... (cached) yes
>>> Checking for C library m... (cached) yes
>>> Checking for C library python2.7... (cached) yes
>>> Checking for accept(0,0,0) in C++ library None... (cached) yes
>>> Checking for zlibVersion() in C++ library z... (cached) yes
>>> Checking for GOOGLE_PROTOBUF_VERIFY_VERSION in C++ library protobuf...
>>> (cached) no
>>> Warning: did not find protocol buffer library and/or headers.
>>>Please install libprotobuf-dev for tracing support.
>>> Checking for clock_nanosleep(0,0,NULL,NULL) in C library None...
>>> (cached) yes
>>> Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library
>>> None... (cached) no
>>> Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library
>>> rt... (cached) yes
>>> Checking for C library tcmalloc... (cached) no
>>> Checking for C library tcmalloc_minimal... (cached) no
>>> You can get a 12% performance improvement by installing tcmalloc
>>> (libgoogle-perftools-dev package on Ubuntu or RedHat).
>>> Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library None...
>>> (cached) no
>>> Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library
>>> execinfo... (cached) no
>>> No suitable back trace implementation found.
>>> Checking for C header file fenv.h... (cached) yes
>>> Checking for C header file png.h... (cached) no
>>> Warning: Header file  not found.
>>>  This host has no libpng library.
>>>  Disabling support for PNG framebuffers.
>>> Checking for C header file linux/kvm.h... (cached) yes
>>> Checking for C header file linux/if_tun.h... (cached) yes
>>> Checking size of struct kvm_xsave ... (cached) yes
>>> Checking for member exclude_host in struct perf_event_attr...(cached) yes
>>> Checking whether __i386__ is declared... (cached) no
>>> Checking whether __x86_64__ is declared... (cached) yes
>>> Building in /home/cc/gem5-prefetch-camat/build/X86
>>> Using saved variables file
>>> /home/cc/gem5-prefetch-camat/build/variables/X86
>>> ImportError: No module named MemTraceProbe:
>>>   File "/home/cc/gem5-prefetch-camat/SConstruct", line 1249:
>>> SConscript('src/SConscript', variant_dir = variant_path, exports =
>>> 'env')
>>>   File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py",
>>> line 614:
>>> return method(*args, **kw)
>>>   File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py",
>>> line 551:
>>> return _SConscript(self.fs, *files, **subst_kw)
>>>   File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py",
>>> line 260:
>>> exec _file_ in call_stack[-1].globals
>>>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 532:
>>> exec('from m5.objects import %s' % modname)
>>>   File "", line 1:
>>> None
>>>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
>>> exec file(source.abspath, 'r') in mod.__dict__
>>>   File "/home/cc/gem5-prefetch-camat/src/cpu/simple/AtomicSimpleCPU.py",
>>> line 42:
>>> from BaseSimpleCPU import BaseSimpleCPU
>>>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
>>> exec file(source.abspath, 'r') in mod.__dict__
>>>   File "/home/cc/gem5-prefetch-camat/src/cpu/simple/BaseSimpleCPU.py",
>>> line 31:
>>> from BaseCPU import BaseCPU
>>>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
>>> exec file(source.abspath, 'r') in mod.__dict__
>>>   File "/home/cc/gem5-prefetch-camat/src/cpu/BaseCPU.py", line 60:
>>> from m5.objects.MemTraceProbe import *

Re: [gem5-users] MemTraceProbe cannot be imported successfully

2019-07-25 Thread Abhishek Singh
Can you try older version of libptotoc like libprotoc 2.6.1?

On Thu, Jul 25, 2019 at 11:18 AM Rosen Lu  wrote:

> Hi,
>
> I set the environment as follow:
>
> export PATH=$PATH:/usr/local/protobuf/bin
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/protobuf/lib
> export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/protobuf/lib
>
> Best,
> Rosen
>
> Serhat Gesoglu  于2019年7月25日周四 上午9:43写道:
>
>> Hello,
>> Could you try locating the protoc bin and setting the environment PROTOC
>> to it?
>>
>> Serhat
>>
>> --
>> *From:* gem5-users [gem5-users-boun...@gem5.org] on behalf of Rosen Lu [
>> wisdom@gmail.com]
>> *Sent:* 25 July 2019 15:06
>> *To:* gem5 users mailing list
>> *Subject:* Re: [gem5-users] MemTraceProbe cannot be imported successfully
>>
>> Hello Serhat,
>>
>> Thank you for your reply. After I rebuilt gem5, the following error
>> message prompted:
>> ***
>> scons: Reading SConscript files ...
>> Package protobuf was not found in the pkg-config search path.
>> Perhaps you should add the directory containing `protobuf.pc'
>> to the PKG_CONFIG_PATH environment variable
>> No package 'protobuf' found
>> Warning: pkg-config could not get protobuf flags.
>> Checking for C header file Python.h... (cached) yes
>> Checking for C library pthread... (cached) yes
>> Checking for C library dl... (cached) yes
>> Checking for C library util... (cached) yes
>> Checking for C library m... (cached) yes
>> Checking for C library python2.7... (cached) yes
>> Checking for accept(0,0,0) in C++ library None... (cached) yes
>> Checking for zlibVersion() in C++ library z... (cached) yes
>> Checking for GOOGLE_PROTOBUF_VERIFY_VERSION in C++ library protobuf...
>> (cached) no
>> Warning: did not find protocol buffer library and/or headers.
>>Please install libprotobuf-dev for tracing support.
>> Checking for clock_nanosleep(0,0,NULL,NULL) in C library None... (cached)
>> yes
>> Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library
>> None... (cached) no
>> Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library rt...
>> (cached) yes
>> Checking for C library tcmalloc... (cached) no
>> Checking for C library tcmalloc_minimal... (cached) no
>> You can get a 12% performance improvement by installing tcmalloc
>> (libgoogle-perftools-dev package on Ubuntu or RedHat).
>> Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library None...
>> (cached) no
>> Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library
>> execinfo... (cached) no
>> No suitable back trace implementation found.
>> Checking for C header file fenv.h... (cached) yes
>> Checking for C header file png.h... (cached) no
>> Warning: Header file  not found.
>>  This host has no libpng library.
>>  Disabling support for PNG framebuffers.
>> Checking for C header file linux/kvm.h... (cached) yes
>> Checking for C header file linux/if_tun.h... (cached) yes
>> Checking size of struct kvm_xsave ... (cached) yes
>> Checking for member exclude_host in struct perf_event_attr...(cached) yes
>> Checking whether __i386__ is declared... (cached) no
>> Checking whether __x86_64__ is declared... (cached) yes
>> Building in /home/cc/gem5-prefetch-camat/build/X86
>> Using saved variables file
>> /home/cc/gem5-prefetch-camat/build/variables/X86
>> ImportError: No module named MemTraceProbe:
>>   File "/home/cc/gem5-prefetch-camat/SConstruct", line 1249:
>> SConscript('src/SConscript', variant_dir = variant_path, exports =
>> 'env')
>>   File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py",
>> line 614:
>> return method(*args, **kw)
>>   File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py",
>> line 551:
>> return _SConscript(self.fs, *files, **subst_kw)
>>   File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py",
>> line 260:
>> exec _file_ in call_stack[-1].globals
>>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 532:
>> exec('from m5.objects import %s' % modname)
>>   File "", line 1:
>> None
>>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
>> exec file(source.abspath, 'r') in mod.__dict__
>>   File "/home/cc/gem5-prefetch-camat/src/cpu/simple/AtomicSimpleCPU.py",
>> line 42:
>> from BaseSimpleCPU import BaseSimpleCPU
>>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
>> exec file(source.abspath, 'r') in mod.__dict__
>>   File "/home/cc/gem5-prefetch-camat/src/cpu/simple/BaseSimpleCPU.py",
>> line 31:
>> from BaseCPU import BaseCPU
>>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
>> exec file(source.abspath, 'r') in mod.__dict__
>>   File "/home/cc/gem5-prefetch-camat/src/cpu/BaseCPU.py", line 60:
>> from m5.objects.MemTraceProbe import *
>> ***
>>
>> I think this error was because of the absence of protobuf.  However, I
>> have installed protobuf,
>> ***
>> protoc --version
>> libprotoc 3.9.0
>> ***
>> So is this a version 

Re: [gem5-users] MemTraceProbe cannot be imported successfully

2019-07-25 Thread Rosen Lu
Hi,

I set the environment as follow:

export PATH=$PATH:/usr/local/protobuf/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/protobuf/lib
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/protobuf/lib

Best,
Rosen

Serhat Gesoglu  于2019年7月25日周四 上午9:43写道:

> Hello,
> Could you try locating the protoc bin and setting the environment PROTOC
> to it?
>
> Serhat
>
> --
> *From:* gem5-users [gem5-users-boun...@gem5.org] on behalf of Rosen Lu [
> wisdom@gmail.com]
> *Sent:* 25 July 2019 15:06
> *To:* gem5 users mailing list
> *Subject:* Re: [gem5-users] MemTraceProbe cannot be imported successfully
>
> Hello Serhat,
>
> Thank you for your reply. After I rebuilt gem5, the following error
> message prompted:
> ***
> scons: Reading SConscript files ...
> Package protobuf was not found in the pkg-config search path.
> Perhaps you should add the directory containing `protobuf.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'protobuf' found
> Warning: pkg-config could not get protobuf flags.
> Checking for C header file Python.h... (cached) yes
> Checking for C library pthread... (cached) yes
> Checking for C library dl... (cached) yes
> Checking for C library util... (cached) yes
> Checking for C library m... (cached) yes
> Checking for C library python2.7... (cached) yes
> Checking for accept(0,0,0) in C++ library None... (cached) yes
> Checking for zlibVersion() in C++ library z... (cached) yes
> Checking for GOOGLE_PROTOBUF_VERIFY_VERSION in C++ library protobuf...
> (cached) no
> Warning: did not find protocol buffer library and/or headers.
>Please install libprotobuf-dev for tracing support.
> Checking for clock_nanosleep(0,0,NULL,NULL) in C library None... (cached)
> yes
> Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library
> None... (cached) no
> Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library rt...
> (cached) yes
> Checking for C library tcmalloc... (cached) no
> Checking for C library tcmalloc_minimal... (cached) no
> You can get a 12% performance improvement by installing tcmalloc
> (libgoogle-perftools-dev package on Ubuntu or RedHat).
> Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library None...
> (cached) no
> Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library execinfo...
> (cached) no
> No suitable back trace implementation found.
> Checking for C header file fenv.h... (cached) yes
> Checking for C header file png.h... (cached) no
> Warning: Header file  not found.
>  This host has no libpng library.
>  Disabling support for PNG framebuffers.
> Checking for C header file linux/kvm.h... (cached) yes
> Checking for C header file linux/if_tun.h... (cached) yes
> Checking size of struct kvm_xsave ... (cached) yes
> Checking for member exclude_host in struct perf_event_attr...(cached) yes
> Checking whether __i386__ is declared... (cached) no
> Checking whether __x86_64__ is declared... (cached) yes
> Building in /home/cc/gem5-prefetch-camat/build/X86
> Using saved variables file /home/cc/gem5-prefetch-camat/build/variables/X86
> ImportError: No module named MemTraceProbe:
>   File "/home/cc/gem5-prefetch-camat/SConstruct", line 1249:
> SConscript('src/SConscript', variant_dir = variant_path, exports =
> 'env')
>   File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py", line
> 614:
> return method(*args, **kw)
>   File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py", line
> 551:
> return _SConscript(self.fs, *files, **subst_kw)
>   File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py", line
> 260:
> exec _file_ in call_stack[-1].globals
>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 532:
> exec('from m5.objects import %s' % modname)
>   File "", line 1:
> None
>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
> exec file(source.abspath, 'r') in mod.__dict__
>   File "/home/cc/gem5-prefetch-camat/src/cpu/simple/AtomicSimpleCPU.py",
> line 42:
> from BaseSimpleCPU import BaseSimpleCPU
>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
> exec file(source.abspath, 'r') in mod.__dict__
>   File "/home/cc/gem5-prefetch-camat/src/cpu/simple/BaseSimpleCPU.py",
> line 31:
> from BaseCPU import BaseCPU
>   File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
> exec file(source.abspath, 'r') in mod.__dict__
>   File "/home/cc/gem5-prefetch-camat/src/cpu/BaseCPU.py", line 60:
> from m5.objects.MemTraceProbe import *
> ***
>
> I think this error was because of the absence of protobuf.  However, I
> have installed protobuf,
> ***
> protoc --version
> libprotoc 3.9.0
> ***
> So is this a version mismatch problem?
>
> Best,
> Rosen
>
>
> Serhat Gesoglu  于2019年7月25日周四 上午6:33写道:
>
>> Hello,
>> If you are using the recent versions of gem5, you should use:
>> ***
>> from m5.objects.CommMonitor import *
>> from m5.objects.MemTraceProbe 

Re: [gem5-users] MemTraceProbe cannot be imported successfully

2019-07-25 Thread Serhat Gesoglu
Hello,
Could you try locating the protoc bin and setting the environment PROTOC to it?

Serhat


From: gem5-users [gem5-users-boun...@gem5.org] on behalf of Rosen Lu 
[wisdom@gmail.com]
Sent: 25 July 2019 15:06
To: gem5 users mailing list
Subject: Re: [gem5-users] MemTraceProbe cannot be imported successfully

Hello Serhat,

Thank you for your reply. After I rebuilt gem5, the following error message 
prompted:
***
scons: Reading SConscript files ...
Package protobuf was not found in the pkg-config search path.
Perhaps you should add the directory containing `protobuf.pc'
to the PKG_CONFIG_PATH environment variable
No package 'protobuf' found
Warning: pkg-config could not get protobuf flags.
Checking for C header file Python.h... (cached) yes
Checking for C library pthread... (cached) yes
Checking for C library dl... (cached) yes
Checking for C library util... (cached) yes
Checking for C library m... (cached) yes
Checking for C library python2.7... (cached) yes
Checking for accept(0,0,0) in C++ library None... (cached) yes
Checking for zlibVersion() in C++ library z... (cached) yes
Checking for GOOGLE_PROTOBUF_VERIFY_VERSION in C++ library protobuf... (cached) 
no
Warning: did not find protocol buffer library and/or headers.
   Please install libprotobuf-dev for tracing support.
Checking for clock_nanosleep(0,0,NULL,NULL) in C library None... (cached) yes
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library None... 
(cached) no
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library rt... 
(cached) yes
Checking for C library tcmalloc... (cached) no
Checking for C library tcmalloc_minimal... (cached) no
You can get a 12% performance improvement by installing tcmalloc 
(libgoogle-perftools-dev package on Ubuntu or RedHat).
Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library None... (cached) 
no
Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library execinfo... 
(cached) no
No suitable back trace implementation found.
Checking for C header file fenv.h... (cached) yes
Checking for C header file png.h... (cached) no
Warning: Header file  not found.
 This host has no libpng library.
 Disabling support for PNG framebuffers.
Checking for C header file linux/kvm.h... (cached) yes
Checking for C header file linux/if_tun.h... (cached) yes
Checking size of struct kvm_xsave ... (cached) yes
Checking for member exclude_host in struct perf_event_attr...(cached) yes
Checking whether __i386__ is declared... (cached) no
Checking whether __x86_64__ is declared... (cached) yes
Building in /home/cc/gem5-prefetch-camat/build/X86
Using saved variables file /home/cc/gem5-prefetch-camat/build/variables/X86
ImportError: No module named MemTraceProbe:
  File "/home/cc/gem5-prefetch-camat/SConstruct", line 1249:
SConscript('src/SConscript', variant_dir = variant_path, exports = 'env')
  File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py", line 614:
return method(*args, **kw)
  File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py", line 551:
return _SConscript(self.fs, *files, **subst_kw)
  File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py", line 260:
exec _file_ in call_stack[-1].globals
  File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 532:
exec('from m5.objects import %s' % modname)
  File "", line 1:
None
  File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
exec file(source.abspath, 'r') in mod.__dict__
  File "/home/cc/gem5-prefetch-camat/src/cpu/simple/AtomicSimpleCPU.py", line 
42:
from BaseSimpleCPU import BaseSimpleCPU
  File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
exec file(source.abspath, 'r') in mod.__dict__
  File "/home/cc/gem5-prefetch-camat/src/cpu/simple/BaseSimpleCPU.py", line 31:
from BaseCPU import BaseCPU
  File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
exec file(source.abspath, 'r') in mod.__dict__
  File "/home/cc/gem5-prefetch-camat/src/cpu/BaseCPU.py", line 60:
from m5.objects.MemTraceProbe import *
***

I think this error was because of the absence of protobuf.  However, I have 
installed protobuf,
***
protoc --version
libprotoc 3.9.0
***
So is this a version mismatch problem?

Best,
Rosen


Serhat Gesoglu 
mailto:serhat.geso...@manchester.ac.uk>> 
于2019年7月25日周四 上午6:33写道:
Hello,
If you are using the recent versions of gem5, you should use:
***
from m5.objects.CommMonitor import *
from m5.objects.MemTraceProbe import *
***

instead of "from  import *"

I just did a clean install / build and did not have any errors.

Kind regards
Serhat


From: gem5-users 
[gem5-users-boun...@gem5.org] on behalf of 
Rosen Lu [wisdom@gmail.com]
Sent: 25 July 2019 05:48
To: gem5-users@gem5.org
Subject: [gem5-users] MemTraceProbe 

Re: [gem5-users] MemTraceProbe cannot be imported successfully

2019-07-25 Thread Rosen Lu
Hello Serhat,

Thank you for your reply. After I rebuilt gem5, the following error message
prompted:
***
scons: Reading SConscript files ...
Package protobuf was not found in the pkg-config search path.
Perhaps you should add the directory containing `protobuf.pc'
to the PKG_CONFIG_PATH environment variable
No package 'protobuf' found
Warning: pkg-config could not get protobuf flags.
Checking for C header file Python.h... (cached) yes
Checking for C library pthread... (cached) yes
Checking for C library dl... (cached) yes
Checking for C library util... (cached) yes
Checking for C library m... (cached) yes
Checking for C library python2.7... (cached) yes
Checking for accept(0,0,0) in C++ library None... (cached) yes
Checking for zlibVersion() in C++ library z... (cached) yes
Checking for GOOGLE_PROTOBUF_VERIFY_VERSION in C++ library protobuf...
(cached) no
Warning: did not find protocol buffer library and/or headers.
   Please install libprotobuf-dev for tracing support.
Checking for clock_nanosleep(0,0,NULL,NULL) in C library None... (cached)
yes
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library None...
(cached) no
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library rt...
(cached) yes
Checking for C library tcmalloc... (cached) no
Checking for C library tcmalloc_minimal... (cached) no
You can get a 12% performance improvement by installing tcmalloc
(libgoogle-perftools-dev package on Ubuntu or RedHat).
Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library None...
(cached) no
Checking for backtrace_symbols_fd((void*)0, 0, 0) in C library execinfo...
(cached) no
No suitable back trace implementation found.
Checking for C header file fenv.h... (cached) yes
Checking for C header file png.h... (cached) no
Warning: Header file  not found.
 This host has no libpng library.
 Disabling support for PNG framebuffers.
Checking for C header file linux/kvm.h... (cached) yes
Checking for C header file linux/if_tun.h... (cached) yes
Checking size of struct kvm_xsave ... (cached) yes
Checking for member exclude_host in struct perf_event_attr...(cached) yes
Checking whether __i386__ is declared... (cached) no
Checking whether __x86_64__ is declared... (cached) yes
Building in /home/cc/gem5-prefetch-camat/build/X86
Using saved variables file /home/cc/gem5-prefetch-camat/build/variables/X86
ImportError: No module named MemTraceProbe:
  File "/home/cc/gem5-prefetch-camat/SConstruct", line 1249:
SConscript('src/SConscript', variant_dir = variant_path, exports =
'env')
  File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py", line
614:
return method(*args, **kw)
  File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py", line
551:
return _SConscript(self.fs, *files, **subst_kw)
  File "/usr/lib/python2.7/site-packages/SCons/Script/SConscript.py", line
260:
exec _file_ in call_stack[-1].globals
  File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 532:
exec('from m5.objects import %s' % modname)
  File "", line 1:
None
  File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
exec file(source.abspath, 'r') in mod.__dict__
  File "/home/cc/gem5-prefetch-camat/src/cpu/simple/AtomicSimpleCPU.py",
line 42:
from BaseSimpleCPU import BaseSimpleCPU
  File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
exec file(source.abspath, 'r') in mod.__dict__
  File "/home/cc/gem5-prefetch-camat/src/cpu/simple/BaseSimpleCPU.py", line
31:
from BaseCPU import BaseCPU
  File "/home/cc/gem5-prefetch-camat/build/X86/SConscript", line 512:
exec file(source.abspath, 'r') in mod.__dict__
  File "/home/cc/gem5-prefetch-camat/src/cpu/BaseCPU.py", line 60:
from m5.objects.MemTraceProbe import *
***

I think this error was because of the absence of protobuf.  However, I have
installed protobuf,
***
protoc --version
libprotoc 3.9.0
***
So is this a version mismatch problem?

Best,
Rosen


Serhat Gesoglu  于2019年7月25日周四 上午6:33写道:

> Hello,
> If you are using the recent versions of gem5, you should use:
> ***
> from m5.objects.CommMonitor import *
> from m5.objects.MemTraceProbe import *
> ***
>
> instead of "from  import *"
>
> I just did a clean install / build and did not have any errors.
>
> Kind regards
> Serhat
>
> 
> From: gem5-users [gem5-users-boun...@gem5.org] on behalf of Rosen Lu [
> wisdom@gmail.com]
> Sent: 25 July 2019 05:48
> To: gem5-users@gem5.org
> Subject: [gem5-users] MemTraceProbe cannot be imported successfully
>
> Hello,
>
> I am trying to have a monitor between the CPU and L1 Cache, so for
> src/cpu/BaseCPU.py, I edited the function "addPrivateSplitL1Caches":
> ...
> #self.dcache_port = dc.cpu_side
> self.monitor = CommMonitor()
> self.monitor.trace = MemTraceProbe(trace_file="trace.txt")
> self.dcache_port = self.monitor.slave
> self.monitor.master = dc.cpu_side
> ..
> I got an error: 

[gem5-users] RISC-V ISA + Gathering stats for ROI only

2019-07-25 Thread Marcelo Brandalero
Hi all,

I have an application compiled for the RISC-V ISA running in gem5 SE mode.
I want to profile, i.e. get the execution stats, only for a specific kernel
/ Region of Interest (ROI) inside the code.

I understand the standard way to approach this would be to insert m5_ops
that call m5_reset_stats() and m5_dump_stats() but, if I understand
correctly, m5_ops support for RISC-V is still unavailable (thread from Dec
2017 ).

Another way I see is to modify the configuration script by inserting calls
to *system.cpu.scheduleInstStop *and scheduling an event triggered at a
certain instruction count to reset and dump the stats. However, I cannot
figure an easy way to find the exact instruction count where the ROI begins
and ends.

I wonder if there is another simple way to approach this. Is there some way
to access the application's *stdout *from inside the python configuration
script? This way I could insert printf("ROI BEGIN\n"); in my code, compile
without any external library, and then run in gem5 while monitoring the
*stdout* from inside the python script. When that output line is found, the
events are triggered.

Is there any suggestion on how to gathering stats for ROI only in a RISC-V
program, considering the unavailability of m5_ops?

Thank you and best regards

-- 
Marcelo Brandalero
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] MemTraceProbe cannot be imported successfully

2019-07-25 Thread Serhat Gesoglu
Hello,
If you are using the recent versions of gem5, you should use:
***
from m5.objects.CommMonitor import *
from m5.objects.MemTraceProbe import *
***

instead of "from  import *"

I just did a clean install / build and did not have any errors.

Kind regards   
Serhat


From: gem5-users [gem5-users-boun...@gem5.org] on behalf of Rosen Lu 
[wisdom@gmail.com]
Sent: 25 July 2019 05:48
To: gem5-users@gem5.org
Subject: [gem5-users] MemTraceProbe cannot be imported successfully

Hello,

I am trying to have a monitor between the CPU and L1 Cache, so for 
src/cpu/BaseCPU.py, I edited the function "addPrivateSplitL1Caches":
...
#self.dcache_port = dc.cpu_side
self.monitor = CommMonitor()
self.monitor.trace = MemTraceProbe(trace_file="trace.txt")
self.dcache_port = self.monitor.slave
self.monitor.master = dc.cpu_side
..
I got an error: 'MemTraceProbe' is not defined

Then, I  imported CommMonitor and MemTraceProbe in BaseCPU.py
However, MemTraceProbe cannot be imported successfully.
How to solve this problem?
I will appreciate any help.

Best regards,
Rosen
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users