<commit_before>using namespace std;

#include "core.h"
#include "iocoom_performance_model.h"

#include "log.h"
#include "dynamic_instruction_info.h"
#include "config.hpp"
#include "simulator.h"
#include "branch_predictor.h"

IOCOOMPerformanceModel::IOCOOMPerformanceModel(Core *core)
   : PerformanceModel(core)
   , m_instruction_count(0)
   , m_cycle_count(0)
   , m_register_scoreboard(512)
   , m_store_buffer(0)
   , m_load_unit(0)
{
   config::Config *cfg = Sim()->getCfg();

   try
   {
      m_store_buffer = new StoreBuffer(cfg->getInt("perf_model/core/num_store_buffer_entries",1));
      m_load_unit = new LoadUnit(cfg->getInt("perf_model/core/num_outstanding_loads",3));
   }
   catch (...)
   {
      LOG_PRINT_ERROR("Config info not available.");
   }

   for (unsigned int i = 0; i < m_register_scoreboard.size(); i++)
   {
      m_register_scoreboard[i] = 0;
   }
}

IOCOOMPerformanceModel::~IOCOOMPerformanceModel()
{
   delete m_load_unit;
   delete m_store_buffer;
}
<commit_msg>[core perf_model] [iocoom] Re-organized this performance model a little<commit_after>using namespace std;

#include "core.h"
#include "iocoom_performance_model.h"

#include "log.h"
#include "dynamic_instruction_info.h"
#include "config.hpp"
#include "simulator.h"
#include "branch_predictor.h"

IOCOOMPerformanceModel::IOCOOMPerformanceModel(Core *core)
   : PerformanceModel(core)
   , m_instruction_count(0)
   , m_cycle_count(0)
   , m_register_scoreboard(512)
   , m_store_buffer(0)
   , m_load_unit(0)
{
   config::Config *cfg = Sim()->getCfg();

   try
   {
      m_store_buffer = new StoreBuffer(cfg->getInt("perf_model/core/iocoom/num_store_buffer_entries",1));
      m_load_unit = new LoadUnit(cfg->getInt("perf_model/core/iocoom/num_outstanding_loads",3));
   }
   catch (...)
   {
      LOG_PRINT_ERROR("Config info not available.");
   }

   for (unsigned int i = 0; i < m_register_scoreboard.size(); i++)
   {
      m_register_scoreboard[i] = 0;
   }
}

IOCOOMPerformanceModel::~IOCOOMPerformanceModel()
{
   delete m_load_unit;
   delete m_store_buffer;
}

{'fraction_non_alphanumeric': 0.1339458413926499, 'fraction_numerical': 0.010638297872340425, 'mean_word_length': 4.532085561497326, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3873934', 'n_tokens_mistral': 775, 'n_tokens_neox': 759, 'n_words': 118}