14#include "arcane/utils/IPerformanceCounterService.h"
16#include "arcane/utils/PlatformUtils.h"
17#include "arcane/utils/Profiling.h"
18#include "arcane/utils/ForLoopTraceInfo.h"
20#include "arcane/ItemEnumerator.h"
21#include "arcane/SimdItem.h"
23#include "arcane/impl/ItemEnumeratorTracer.h"
34extern "C++" ARCANE_IMPL_EXPORT Ref<IItemEnumeratorTracer>
35arcaneCreateItemEnumeratorTracer(ITraceMng* tm,Ref<IPerformanceCounterService> perf_counter)
37 return Arccore::makeRef<IItemEnumeratorTracer>(
new ItemEnumeratorTracer(tm,perf_counter));
44ItemEnumeratorTracer(ITraceMng* tm,Ref<IPerformanceCounterService> perf_counter)
46, m_perf_counter(perf_counter)
54~ItemEnumeratorTracer()
61void ItemEnumeratorTracer::
62_beginLoop(EnumeratorTraceInfo& eti)
65 m_perf_counter->getCounters(eti.counters(),
false);
66 eti.setBeginTime(platform::getRealTimeNS());
72void ItemEnumeratorTracer::
73_endLoop(EnumeratorTraceInfo& eti)
75 m_perf_counter->getCounters(eti.counters(),
true);
76 const TraceInfo* ti = eti.traceInfo();
77 ForLoopTraceInfo loop_trace_info;
79 loop_trace_info = ForLoopTraceInfo(*ti);
80 ForLoopOneExecStat exec_stat;
81 exec_stat.setBeginTime(eti.beginTime());
82 exec_stat.setEndTime(platform::getRealTimeNS());
83 ProfilingRegistry::_threadLocalForLoopInstance()->merge(exec_stat, loop_trace_info);
89void ItemEnumeratorTracer::
92 m_nb_loop += e.
count();
95 if (
ti && m_is_verbose)
96 info() <<
"Loop:" << (*ti) <<
" count=" << e.
count() <<
" begin_time=" <<
begin_time;
103void ItemEnumeratorTracer::
108 info() <<
"EndLoop: cycle=" <<
eti.counters()[0] <<
" fp=" <<
eti.counters()[1]
109 <<
" L2DCM=" <<
eti.counters()[2];
115void ItemEnumeratorTracer::
119 if (
ti && m_is_verbose)
120 info() <<
"SimdLoop:" << (*ti) <<
" count=" << e.count();
127void ItemEnumeratorTracer::
132 info() <<
"EndSimdLoop: cycle=" <<
eti.counters()[0] <<
" fp=" <<
eti.counters()[1]
133 <<
" L2DCM=" <<
eti.counters()[2];
139void ItemEnumeratorTracer::
142 info() <<
"ITEM_ENUMERATOR_TRACER Stats";
143 info() <<
" nb_call=" << m_nb_call
144 <<
" nb_loop=" << m_nb_loop
145 <<
" ratio=" << (Real)m_nb_loop / (Real)(m_nb_call + 1);
Informations pour les traces d'un énumérator.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-