Skip to content

Commit

Permalink
tp: outline gpufreq name
Browse files Browse the repository at this point in the history
Change-Id: Ia7b252abb4d0f7aa89a51f3b250e206b1029d84f
  • Loading branch information
LalitMaganti committed Oct 28, 2024
1 parent ace9529 commit 906e6b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/trace_processor/importers/common/track_tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ bool IsLegacyCharArrayNameAllowed(tracks::TrackClassification classification) {
classification == tracks::cpu_capacity ||
classification == tracks::cpu_nr_running ||
classification == tracks::cpu_max_frequency_limit ||
classification == tracks::cpu_min_frequency_limit;
classification == tracks::cpu_min_frequency_limit ||
classification == tracks::gpu_frequency;
}

} // namespace
Expand Down Expand Up @@ -522,8 +523,6 @@ TrackId TrackTracker::InternGpuCounterTrack(
row.dimension_arg_set_id = dims_id.arg_set_id;
row.classification =
context_->storage->InternString(tracks::ToString(classification));
if (classification == tracks::gpu_frequency)
row.name = context_->storage->InternString("gpufreq");

TrackId track_id =
context_->storage->mutable_gpu_counter_track_table()->Insert(row).id;
Expand Down
4 changes: 2 additions & 2 deletions src/trace_processor/importers/ftrace/ftrace_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,7 @@ void FtraceParser::ParseGpuFreq(int64_t timestamp, ConstBytes blob) {
uint32_t gpu = freq.gpu_id();
uint32_t new_freq = freq.state();
TrackId track = context_->track_tracker->InternGpuCounterTrack(
tracks::gpu_frequency, gpu);
tracks::gpu_frequency, gpu, TrackTracker::LegacyCharArrayName{"gpufreq"});
context_->event_tracker->PushCounter(timestamp, new_freq, track);
}

Expand All @@ -1710,7 +1710,7 @@ void FtraceParser::ParseKgslGpuFreq(int64_t timestamp, ConstBytes blob) {
// Source data is frequency / 1000, so we correct that here:
double new_freq = static_cast<double>(freq.gpu_freq()) * 1000.0;
TrackId track = context_->track_tracker->InternGpuCounterTrack(
tracks::gpu_frequency, gpu);
tracks::gpu_frequency, gpu, TrackTracker::LegacyCharArrayName{"gpufreq"});
context_->event_tracker->PushCounter(timestamp, new_freq, track);
}

Expand Down

0 comments on commit 906e6b8

Please sign in to comment.