Date: | Mon, 30 May 2011 11:47:04 +0430 |
---|---|
From: | Hamid Reza Khaleghzadeh <khaleghzadeh@xxxxxxxxx> |
Subject: | [Gems-users] logging address |
Hi I have modified makeRequest() method of Sequencer.c in order to log address of all accessed data. The added code is shown at following: if (g_system_ptr->getTracer()->traceEnabled()) { conf_object_t *cpu; conf_object_t* mmu_obj; //cout<<"Getting processor "<<i<<endl; cpu=SIM_proc_no_2_ptr(m_chip_ptr->getID()*RubyConfig::numberOfProcsPerChip()+m_version); mmu_obj= SIM_get_attribute( cpu, "mmu" ).u.object; int tNumber=SIM_get_attribute(mmu_obj, "ctxt-primary").u.integer & 0x1fff; g_system_ptr->getTracer()->traceRequest((m_chip_ptr->getID()*RubyConfig::numberOfProcsPerChip()+m_version), request.getPhysicalAddress(), request.getLogicalAddress(), request.getType(), g_eventQueue_ptr->getTime(), tNumber); } First half of the code determines threadID of each request and second half logs each request. Now, there are a few problems: 1- I have written below program: int main() { int i=0; printf("%p\n", &i); } This program was executed in simics+ruby and logged all addresses by the added logging code. There is a problem where I can not find address of i variable (printed by printf()) in the created log file. 2- I have written a pthread application that contains two threads where these threads access to a shared integer array that it's size is 100. I have logged address of all accessed data by this application and obtained shared addresses between these two threads. It's clear that number of shared variables between these two threads must be greater than 100, but number of shared addresses that extracted from log file is less than 100. Could you tell me what is wrong? should I insert my logging code in another place? Sorry to bother you. |
[← Prev in Thread] | Current Thread | [Next in Thread→] |
---|---|---|
|
Previous by Date: | [Gems-users] Question about cacheMSG::getPhysicalAddress(), Hamid Reza Khaleghzadeh |
---|---|
Next by Date: | [Gems-users] Assign simulated cores per real cores with gems, Santos G. González T. |
Previous by Thread: | [Gems-users] L2 cache bank stat, hamid reza khaleghzadeh |
Next by Thread: | [Gems-users] logging ALL DATA address, hamid reza khaleghzadeh |
Indexes: | [Date] [Thread] |