Profiler: Simplify the checks on prof_dump_idx
prof_dump_idx is used to record the index of data dumping.
There is also the prof_db_idx to record the index of data saved.
And it points to the next index of the last valid data.
So when doing data dumping, simply ensuring prof_dump_idx not exceeding
prof_db_idx is enough.
The original code is redundant because
prof_db_idx is always <= PROF_DB_MAX, this should be guranteed in the
prof_data_save() function, making the "limit" always equal to
prof_db_idx.
And then the comparision of "prof_dump_idx >= PROF_DB_MAX" can be done
in the for loop.
Change-Id: If6eedbc72d90e10bdf54ab157aa142976e2ac1de
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
1 file changed