This is an archive of the discontinued LLVM Phabricator instance.

[RemarkUtil] Add an option to collect remark count information given a list of keys.
AbandonedPublic

Authored by zjaffal on Jul 13 2023, 5:07 AM.

Details

Summary

There are remarks that have a key,value pair where it would be
benificial to collect inforation for a given key and report it on file
or function basis.

llvm-remarkutil remark-count provides the utility to collect counts
for a set of comma seperated keys for a provided remarkname.

By default the tool will collect and report numbers for the whole remark
file provided
e.g

llvm-remarkutil remark-count --remark-name=name --keys=key1,key2 ...

Output:
key1,key2
123,321

if collect-per-source or collect-per-function are passed then the

count is broken down by source file path or function name
respectively.

Diff Detail

Event Timeline

zjaffal created this revision.Jul 13 2023, 5:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2023, 5:07 AM
Herald added a subscriber: StephenFan. · View Herald Transcript
zjaffal requested review of this revision.Jul 13 2023, 5:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2023, 5:07 AM

I think having the key as a regex is a bit more flexible, wdyt?

Something like --keys=count.*` that also prints the different keys it matched:

count1,count2,count3,count4,counter
0,0,0,0,0
zjaffal abandoned this revision.Aug 2 2023, 2:43 AM

D156869 should cover all the changes that this patch is doing.