Hi Asim,
There are a lot of significant progress. Many confusing facts are ignored and I must point them here in order to make others avoid such failures and go to the wrong road.
1 About GuestSDK. After I asked my friend in VMware, I eventually knew that the GuestSDK has been remove from the vmware-tools package long ago(I and my friend both don't know the reason.) and it now must be download independently. No one has told me about this fact even I posted a post in VMware's community forum. So I have to ask for my friend's help. Now I downloaded a GuestSDK from somewhere in Internet: VMware-GuestSDK-9.7.2-1919049.tar.gz. The reason why I don't download the latest version from official VMware website is that the download link is not available. The download request needs to be reviewed and the page gave a message which said my register profile must be updated and then the sdk can be downloaded, but after I updated my profile, it still can't be downloaded. So unlucky. If you are interested in trying it, see the download link:
https://developercenter.vmware.com/web/ ... here-guestMoreover, my friend don't say the Guest SDK from vSphere is not suitable for VMware Workstation.
2 About the error "componrnts/vmware/vmware.c:1264:24: error: ‘_vmware_init’ undeclared here (not in a function)
.init_thread = _vmware_init,"
This is not related to Guest SDK or vmware tools. This is related to your "component/vmware/vmware.c". Specifically, in line 1264 of vmware.c:
- Code: Select all
.init_thread = _vmware_init,
There is no such a function called _vmware_init in this file. There is a function called _vmware_init_thread and I guess this is exactly the function which should be assigned to the .init_thread. So I changed this line into:
- Code: Select all
.init_thread = _vmware_init_thread
Then, this error disappeared. This is a bug, right?
3 About the include path of vmware component.
According to "components/vmware/VMwareComponentDocument.txt", the right configuration should be:
- Code: Select all
./configure --with-vmware_incdir=/usr/lib/vmware-tools/GuestSDK
So I copy the directory of GuestSDK to /usr/lib/vmwre-tools. The GuestSDK contains the following directories:
- Code: Select all
bin docs include lib vmGuestLibJava
The include and lib are what I need.
After I run "./configure --with-vmware_incdir=/usr/lib/vmware-tools/GuestSDK", I got the messages:
- Code: Select all
checking for vmGuestLib.h... no
configure: WARNING: vmGuestLib.h not found
So I have to change the include path into "/usr/lib/vmware-tools/GuestSDK/include", then the configure found vmGuestLib.h.
Next, I backed to the "src" and ran "./configure --with-components=vmware" and "make", it finished normally. Then, I ran "make test", I got the following errors:
- Code: Select all
gcc -I.. -I../testlib -I.. -g -DSTATIC_PAPI_EVENTS_TABLE -DPEINCLUDE="libpfm4/include/perfmon/perf_event.h" -D_R
EENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Wall -Ilibpfm4/include -Wextra -I/usr/lib/vmware-tools/GuestSDK/incl
ude -DVMGUESTLIB=1 -DVMWARE_INCDIR="/usr/lib/vmware-tools/GuestSDK/include" -DPAPI_NO_MEMORY_MANAGEMENT -O0 api.
c ../testlib/libtestlib.a ../libpapi.a -ldl -o api
make[1]: Leaving directory '/root/tools/papi-5.4.1/src/ctests'
ctests/zero
dlopen of libvmGuestLib.so failed: 'libvmtools.so: cannot open shared object file: No such file or directory'
dlopen of /usr/lib/vmware-tools/GuestSDK/include/lib/lib64/libvmGuestLib.so failed: '/usr/lib/vmware-tools/Guest
SDK/include/lib/lib64/libvmGuestLib.so: cannot open shared object file: No such file or directory'
dlopen of /usr/lib/vmware-tools/GuestSDK/include/lib/lib32/libvmGuestLib.so failed: '/usr/lib/vmware-tools/Guest
SDK/include/lib/lib32/libvmGuestLib.so: cannot open shared object file: No such file or directory'
Test case 0: start, stop.
-----------------------------------------------
Default domain is: 1 (PAPI_DOM_USER)
Apparently the vmware component of papi couldn't identify the right lib path of GuestSDK. So then I had to search all possible Makefiles related to vmware from multiple directories such "src" "ctests' and "testlib" and eventually found one, that is, "components/vmware/Makefile.vmware. I opened it and found the definitions:
- Code: Select all
VMWARE_INCDIR = /usr/lib/vmware-tools/GuestSDK/include
2 VMGUESTLIB = 1
So I changed it into the following: (I tried multiple modifications):
- Code: Select all
VMWARE_INCDIR = /usr/lib/vmware-tools/GuestSDK
2 VMGUESTLIB = 1
- Code: Select all
VMWARE_INCDIR = /usr/lib/vmware-tools/GuestSDK/inlcude /usr/lib/vmware-tools/GuestSDK
2 VMGUESTLIB = 1
- Code: Select all
VMWARE_INCDIR = /usr/lib/vmware-tools/GuestSDK/include /usr/lib/vmware-tools/GuestSDK/lib64
2 VMGUESTLIB = 1
- Code: Select all
VMWARE_INCDIR = /usr/lib/vmware-tools/GuestSDK/include: /usr/lib/vmware-tools/GuestSDK/lib64
2 VMGUESTLIB = 1
- Code: Select all
VMWARE_INCDIR = /usr/lib/vmware-tools/GuestSDK/lib64
2 VMGUESTLIB = 1
Unfortunately, none of them works. The errors still existed!
Next, I had to copy all the files in "include" and "lib/lib64" of GuestSDK to "GuestSDK". And I "make clean clobber" and reconfigured with"/usr/lib/vmware-tools/GuestSDK" and remake and make test. Thanks God, this error eventually disappeared!
BUT, BUT, new failure began to appear(Why are there so many failures and errors along with me?! Oh My God!)
Please see the following messages:
- Code: Select all
EENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Wall -Ilibpfm4/include -Wextra -I/usr/lib/vmware-tools/GuestSDK -DVM
GUESTLIB=1 -DVMWARE_INCDIR="/usr/lib/vmware-tools/GuestSDK" -DPAPI_NO_MEMORY_MANAGEMENT -O0 api.c ../testlib/lib
testlib.a ../libpapi.a -ldl -o api
make[1]: Leaving directory '/root/tools/papi-5.4.1/src/ctests'
ctests/zero
UpdateInfo failed: VMware Guest API is not enabled on the host
Test case 0: start, stop.
-----------------------------------------------
Default domain is: 1 (PAPI_DOM_USER)
Default granularity is: 1 (PAPI_GRN_THR)
Using 20000000 iterations of c += a*b
-------------------------------------------------------------------------
Test type : 1
PAPI_TOT_INS : 220000194
PAPI_TOT_CYC : 206748205
Real usec : 59479
Real cycles : 189893921
Virt usec : 59526
Virt cycles : 190006992
-------------------------------------------------------------------------
Verification: PAPI_TOT_CYC should be roughly real_cycles
NOTE: Not true if dynamic frequency scaling is enabled.
Verification: PAPI_FP_INS should be roughly 40000000
PAPI_TOT_INS Error of 450.00%
zero.c FAILED
Line # 130
Error: FLOPS validation
Makefile.inc:225: recipe for target 'test' failed
make: *** [test] Error 1
Please pay attention to this word: "VMware Guest API is not enabled on the host". Only from this word, I can't judge whether it is related to PAPI or VMware Workstation. Now I have to stop because I really don't know anymore. This installation is really a tough process for me. I feel so tired...
The other topic, about
- Code: Select all
<not supported> stalled-cycles-frontend
<not supported> stalled-cycles-backend
I saw your link and some other pages I found from google. No clear decisions and reasons are answered. Few people encounter this problem and fewer people care about this. The reason why I care about it so much is that my research area is microprocessor architecture. I also again installed my linux(The kernel is still 3.16) on bare metal machine and the "perf stat" still showed this "<not supported>". As a comparison, my roommate's linux on bare metal linux(kernel is 3.19) showed perfect support to the two non-architectural metrics. But his cpu is very old. So the only left possible reason may be my lower linux kernel version whose perf still can't support my new cpu architecture, that is, Haswell. I'll try the linux with 3.19 and if it still doesn't show support to my cpu, I will have to switch to other tools.
By the way, the installation of perf is also a tough process in order to make the "perf test" get all the pass. As of now, I have not sawn such "all pass" appears in all machines I can use, at least five machines including some advanced Intel Xeon Servers.
To be continued.
hiratz
yarkhan wrote:Good to hear that you have had some progress here.
About your question
"does "<not supported>" mean my cpu can't support this event?"
I do not know. It may be that the event is not available through the virtual machine, or it is not supported on the cpu.
This stackoverflow link has some additional information for "not supported" events.
http://stackoverflow.com/questions/2271 ... -supported.
About your second problem compiling PAPI with the vmware component, the GuestSDK would be required since this error shows up.
"componrnts/vmware/vmware.c:1264:24: error: ‘_vmware_init’ undeclared here (not in a function)
.init_thread = _vmware_init,"
There is some information from the VMWare knowledge base that talks about installing the VMWare Tools.
General VMware Tools installation instructions (1014294)
http://kb.vmware.com/selfservice/search ... Id=1014294The VMWare Tools should include the GuestSDK.
Hopefully this information will let you make some more progress.
Asim