[PATCH] D130944: [llvm-profdata] Add --json
    Hongtao Yu via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Aug  2 22:44:00 PDT 2022
    
    
  
hoy added a comment.
Perhaps make it explicit in the title that this is json an output-only format so far?
================
Comment at: llvm/lib/ProfileData/SampleProfWriter.cpp:539
+
+    SampleSorter<LineLocation, SampleRecord> SortedSamples(
+        S.getBodySamples());
----------------
Wondering if this is necessary since `S.getBodySamples()` returns a `BodySampleMap` object which is already ordered.
Similarly with getCallsiteSamples below.
================
Comment at: llvm/test/tools/llvm-profdata/sample-profile-json.test:3
+JSON: [
+JSON:   {
+JSON:     "name": "main",
----------------
nit: use JSON-next for this line and below
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130944/new/
https://reviews.llvm.org/D130944
    
    
More information about the llvm-commits
mailing list