ProcFS: Rename "samples" in /proc/profile to "frames"

These are stack frames, not profile samples. :^)
This commit is contained in:
Andreas Kling 2019-12-12 20:36:41 +01:00
parent 17f3948b15
commit bc919c8432
Notes: sideshowbarker 2024-07-19 10:52:53 +09:00

View file

@ -365,16 +365,16 @@ Optional<KBuffer> procfs$profile(InodeIdentifier)
object.add("pid", sample.pid);
object.add("tid", sample.tid);
object.add("timestamp", sample.timestamp);
auto sample_array = object.add_array("samples");
auto frames_array = object.add_array("frames");
for (size_t i = 0; i < Profiling::max_stack_frame_count; ++i) {
if (sample.frames[i] == 0)
break;
auto frame_object = sample_array.add_object();
auto frame_object = frames_array.add_object();
frame_object.add("address", JsonValue((u32)sample.frames[i]));
frame_object.add("symbol", sample.symbolicated_frames[i]);
frame_object.finish();
}
sample_array.finish();
frames_array.finish();
});
array.finish();
return builder.build();