14#include "arcane/core/EntryPoint.h"
16#include "arcane/utils/ITraceMng.h"
17#include "arcane/utils/PlatformUtils.h"
18#include "arcane/utils/StringBuilder.h"
20#include "arcane/core/IModule.h"
21#include "arcane/core/IEntryPointMng.h"
22#include "arcane/core/ISubDomain.h"
23#include "arcane/core/Timer.h"
42const char*
const IEntryPoint::WExit =
"Exit";
49: m_sub_domain(bi.module()->subDomain())
50, m_caller(bi.caller())
51, m_elapsed_timer(new
Timer(m_sub_domain, bi.name(),
Timer::TimerReal))
53, m_module(bi.module())
55, m_property(bi.property())
57, m_is_destroy_caller(bi.isDestroyCaller())
65 sb.append(m_module->name());
70 m_full_name = sb.toString();
77EntryPoint* EntryPoint::
80 EntryPoint* x =
new EntryPoint(bi);
90 delete m_elapsed_timer;
92 if (m_is_destroy_caller)
100#pragma GCC optimize "O0"
103_getAddressForHyoda(
void* next_entry_point_address)
105#ifndef ARCANE_OS_WIN32
109 char address[48 + 1];
110 snprintf(address,
sizeof(address) - 1,
"%p", next_entry_point_address);
116#pragma GCC reset_options
135 _getAddressForHyoda();
139 Trace::Setter mclass(m_sub_domain->traceMng(), m_module->name());
146 m_caller->executeFunctor();
158 return m_elapsed_timer->lastActivationTime();
167 return m_elapsed_timer->totalTime();
174lastElapsedTime()
const
176 return m_elapsed_timer->lastActivationTime();
183totalElapsedTime()
const
185 return m_elapsed_timer->totalTime();
Information to build an entry point.
Real lastElapsedTime() const override
Elapsed execution time (clock time) of the last iteration (in milliseconds).
Real totalElapsedTime() const override
Elapsed execution time (clock time) in this entry point (in milliseconds).
static const char *const WComputeLoop
called during the calculation loop
static const char *const WBuild
called for module construction
static const char *const WStartInit
called during new case initialization
static const char *const WRestore
called to restore variables during a rollback
static const char *const WOnMeshRefinement
called after mesh refinement
static const char *const WOnMeshChanged
called after a mesh change
static const char *const WContinueInit
called during continuation initialization
static const char *const WInit
called during initialization
Positions the name of the currently executing action.
Positions the phase of the currently executing action.
Sentinel for the timer. The sentinel associated with a timer allows it to be triggered upon its const...
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
double Real
Type representing a real number.
void addEntryPoint(ModuleType *module, const char *name, void(ModuleType::*func)(), const String &where=IEntryPoint::WComputeLoop, int property=IEntryPoint::PNone)
Template routine allowing an entry point to be referenced in a module.