Mentions légales du service

Skip to content
Snippets Groups Projects
Commit f207a00e authored by Thierry's avatar Thierry
Browse files

[fix] deleted whitespace in csv

parent cfe50a58
No related branches found
No related tags found
No related merge requests found
...@@ -2473,7 +2473,7 @@ int csv_parallel_region_t::closefile(int cpucount) ...@@ -2473,7 +2473,7 @@ int csv_parallel_region_t::closefile(int cpucount)
/* header */ /* header */
fprintf(csv_parallel_region_t::fout, fprintf(csv_parallel_region_t::fout,
"Resource, Numa, Start, End, Duration, Explicit, Aff, Strict, Tag, Name, TaskId" "Resource,Numa,Start,End,Duration,Explicit,Aff,Strict,Tag,Name,TaskId"
); );
if (!kaapi_perf_idset_empty(&rastello_header.task_perf_mask)) if (!kaapi_perf_idset_empty(&rastello_header.task_perf_mask))
{ {
...@@ -2482,7 +2482,7 @@ int csv_parallel_region_t::closefile(int cpucount) ...@@ -2482,7 +2482,7 @@ int csv_parallel_region_t::closefile(int cpucount)
{ {
if (kaapi_perf_idset_test(&rastello_header.task_perf_mask, i)) if (kaapi_perf_idset_test(&rastello_header.task_perf_mask, i))
{ {
fprintf(csv_parallel_region_t::fout, ", %s", rastello_header.perfcounter_name[i] ); fprintf(csv_parallel_region_t::fout, ",%s", rastello_header.perfcounter_name[i] );
} }
} }
} }
...@@ -2514,7 +2514,7 @@ int csv_parallel_region_t::closefile(int cpucount) ...@@ -2514,7 +2514,7 @@ int csv_parallel_region_t::closefile(int cpucount)
/* csv header */ /* csv header */
fprintf(csv_parallel_region_t::fout_complexity, fprintf(csv_parallel_region_t::fout_complexity,
"Start, Tc, Work, Task\n" "Start,Tc,Work,Task\n"
); );
} }
struct pair { struct pair {
...@@ -2529,7 +2529,7 @@ int csv_parallel_region_t::closefile(int cpucount) ...@@ -2529,7 +2529,7 @@ int csv_parallel_region_t::closefile(int cpucount)
{ {
std::vector<pair> values; std::vector<pair> values;
task_info* task = *ribeg; task_info* task = *ribeg;
pair remain = {task->stop, 0ULL, 0ULL}; pair remain = {task->stop,0ULL, 0ULL};
values.resize( container_orderedlist.size()+1); values.resize( container_orderedlist.size()+1);
size_t pos = container_orderedlist.size(); size_t pos = container_orderedlist.size();
values[pos--] = remain; values[pos--] = remain;
...@@ -2548,7 +2548,7 @@ int csv_parallel_region_t::closefile(int cpucount) ...@@ -2548,7 +2548,7 @@ int csv_parallel_region_t::closefile(int cpucount)
for (pos=0; pos< values.size(); ++pos) for (pos=0; pos< values.size(); ++pos)
{ {
fprintf(csv_parallel_region_t::fout_complexity, fprintf(csv_parallel_region_t::fout_complexity,
"%" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 "\n", "%" PRIu64 ",%" PRIu64 ",%" PRIu64 ",%" PRIu64 "\n",
values[pos].stamp, values[pos].stamp,
values[pos].tc, values[pos].tc,
values[pos].work, values[pos].work,
...@@ -2579,21 +2579,21 @@ int csv_parallel_region_t::closefile(int cpucount) ...@@ -2579,21 +2579,21 @@ int csv_parallel_region_t::closefile(int cpucount)
{ {
case threadstate_t::STATE: case threadstate_t::STATE:
fprintf(csv_parallel_region_t::fout_threads, fprintf(csv_parallel_region_t::fout_threads,
"%i, STATE, %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %i, %i,,\n", "%i,STATE,%" PRIu64 ",%" PRIu64 ",%" PRIu64 ",%" PRIu64 ",%i,%i,,\n",
ts.kid, ts.start, ts.stop, ts.delay(), ts.kid, ts.start, ts.stop, ts.delay(),
ts.value, ts.cpu, ts.node ts.value, ts.cpu, ts.node
); );
break; break;
case threadstate_t::POP: case threadstate_t::POP:
fprintf(csv_parallel_region_t::fout_threads, fprintf(csv_parallel_region_t::fout_threads,
"%i, POP, %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %i, %i, %i, %i\n", "%i,POP,%" PRIu64 ",%" PRIu64 ",%" PRIu64 ",%" PRIu64 ",%i,%i,%i,%i\n",
ts.kid, ts.start, ts.stop, ts.delay(), ts.kid, ts.start, ts.stop, ts.delay(),
ts.value, ts.cpu, ts.node, ts.victim_level, ts.victim_id ts.value, ts.cpu, ts.node, ts.victim_level, ts.victim_id
); );
break; break;
case threadstate_t::STEAL: case threadstate_t::STEAL:
fprintf(csv_parallel_region_t::fout_threads, fprintf(csv_parallel_region_t::fout_threads,
"%i, STEAL, %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %i, %i, %i, %i\n", "%i,STEAL,%" PRIu64 ",%" PRIu64 ",%" PRIu64 ",%" PRIu64 ",%i,%i,%i,%i\n",
ts.kid, ts.start, ts.stop, ts.delay(), ts.kid, ts.start, ts.stop, ts.delay(),
ts.value, ts.cpu, ts.node, ts.victim_level, ts.victim_id ts.value, ts.cpu, ts.node, ts.victim_level, ts.victim_id
); );
...@@ -2618,13 +2618,13 @@ int csv_parallel_region_t::closefile(int cpucount) ...@@ -2618,13 +2618,13 @@ int csv_parallel_region_t::closefile(int cpucount)
} }
/* header */ /* header */
fprintf(csv_parallel_region_t::fout_loops, fprintf(csv_parallel_region_t::fout_loops,
"Resource, Stamp, Wid, EvtType, UB, LB, Stride\n" "Resource,Stamp,Wid,EvtType,UB,LB,Stride\n"
); );
for (size_t i=0; i<loopevts.size(); ++i) for (size_t i=0; i<loopevts.size(); ++i)
{ {
loopinfo_t& li = loopevts[i]; loopinfo_t& li = loopevts[i];
fprintf(csv_parallel_region_t::fout_loops, fprintf(csv_parallel_region_t::fout_loops,
"%i, %" PRIu64 ", %" PRIu64 ", %i, %" PRIi64 ", %" PRIi64 ", %" PRIi64 "\n", "%i,%" PRIu64 ",%" PRIu64 ",%i,%" PRIi64 ",%" PRIi64 ",%" PRIi64 "\n",
li.kid, li.start, li.wid, li.type, li.kid, li.start, li.wid, li.type,
li.ub, li.lb, li.stride li.ub, li.lb, li.stride
); );
...@@ -2646,20 +2646,68 @@ int csv_parallel_region_t::closefile(int cpucount) ...@@ -2646,20 +2646,68 @@ int csv_parallel_region_t::closefile(int cpucount)
} }
/* header */ /* header */
fprintf(csv_parallel_region_t::fout_memory, fprintf(csv_parallel_region_t::fout_memory,
"Resource, Stamp, TaskId, Type, Size\n" "Resource,Stamp,TaskId,Type,Size\n"
); );
} }
for (size_t i=0; i<memoryevts.size(); ++i) for (size_t i=0; i<memoryevts.size(); ++i)
{ {
memoryinfo_t& li = memoryevts[i]; memoryinfo_t& li = memoryevts[i];
fprintf(csv_parallel_region_t::fout_memory, fprintf(csv_parallel_region_t::fout_memory,
"%i, %" PRIu64 ", %" PRIu64 ", %i, %" PRIi64 "\n", "%i,%" PRIu64 ",%" PRIu64 ",%i,%" PRIi64 "\n",
li.kid, li.start, li.task, li.type, li.size li.kid, li.start, li.task, li.type, li.size
); );
} }
fflush(csv_parallel_region_t::fout_memory); fflush(csv_parallel_region_t::fout_memory);
if (csv_parallel_region_t::fout_counter ==0)
{
char filename[128];
sprintf(filename, "counters.csv");
csv_parallel_region_t::fout_counter = fopen(filename,"w");
if (csv_parallel_region_t::fout_counter ==0)
{
fprintf(stderr,"*** Cannot open file '%s'\n",filename);
exit(-1);
}
/* header */
fprintf(csv_parallel_region_t::fout_counter,
"Id,Name\n"
);
int count_perfcounter = rastello_header.perfcounter_count & 0xFF;
for (unsigned int i=0; i< count_perfcounter; ++i)
{
if (kaapi_perf_idset_test(&rastello_header.perf_mask, i))
{
fprintf(csv_parallel_region_t::fout_counter, "%i,%s", i, rastello_header.perfcounter_name[i] );
}
}
fclose(csv_parallel_region_t::fout_counter);
csv_parallel_region_t::fout_counter = 0;
sprintf(filename, "uncoreperfctr.csv");
csv_parallel_region_t::fout_counter = fopen(filename,"w");
if (csv_parallel_region_t::fout_counter ==0)
{
fprintf(stderr,"*** Cannot open file '%s'\n",filename);
exit(-1);
}
/* header */
fprintf(csv_parallel_region_t::fout_counter,
"Resource,Stamp,Id,Value\n"
);
}
for (size_t i=0; i<uncoreevts.size(); ++i)
{
uncoreperfctr_t& ei = uncoreevts[i];
fprintf(csv_parallel_region_t::fout_counter,
"%i,%" PRIu64 ",%i,%" PRIi64 "\n",
ei.numaid, ei.start, ei.idx, ei.value
);
}
fflush(csv_parallel_region_t::fout_memory);
/* reset state of the parallel region */ /* reset state of the parallel region */
threadstates.clear(); threadstates.clear();
loopstates.clear(); loopstates.clear();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment