xref: /aosp_15_r20/external/stg/doc/reporting.md (revision 9e3b08ae94a55201065475453d799e8b1378bea6)
1*9e3b08aeSAndroid Build Coastguard Worker# Reporting
2*9e3b08aeSAndroid Build Coastguard Worker
3*9e3b08aeSAndroid Build Coastguard WorkerThis is implemented in `reporting.{h,cc}`.
4*9e3b08aeSAndroid Build Coastguard Worker
5*9e3b08aeSAndroid Build Coastguard WorkerSTG difference reporting is built on [comparison](comparison.md) and
6*9e3b08aeSAndroid Build Coastguard Worker[naming](naming.md). All that remains is to serialise the difference graph into
7*9e3b08aeSAndroid Build Coastguard Workera readable or usable format.
8*9e3b08aeSAndroid Build Coastguard Worker
9*9e3b08aeSAndroid Build Coastguard WorkerJust as ABI graphs may contain cycles, so can difference graphs. STG currently
10*9e3b08aeSAndroid Build Coastguard Workersupports the following reporting options.
11*9e3b08aeSAndroid Build Coastguard Worker
12*9e3b08aeSAndroid Build Coastguard Worker| **format** | **description**                                                 |
13*9e3b08aeSAndroid Build Coastguard Worker| ---------- | --------------------------------------------------------------- |
14*9e3b08aeSAndroid Build Coastguard Worker| plain      | simple recursion, avoiding repeated node visits - unreadable    |
15*9e3b08aeSAndroid Build Coastguard Worker:            : for deep graphs                                                 :
16*9e3b08aeSAndroid Build Coastguard Worker| flat       | graph is split into fragments each rooted at a node that "owns" |
17*9e3b08aeSAndroid Build Coastguard Worker:            : differences                                                     :
18*9e3b08aeSAndroid Build Coastguard Worker| small      | like flat, but empty sub graphs are omitted                     |
19*9e3b08aeSAndroid Build Coastguard Worker| short      | like small, but with lossy compression of repetitive            |
20*9e3b08aeSAndroid Build Coastguard Worker:            : differences                                                     :
21*9e3b08aeSAndroid Build Coastguard Worker| viz        | Graphviz - infeasible for rendering once the graphs become      |
22*9e3b08aeSAndroid Build Coastguard Worker:            : large                                                           :
23*9e3b08aeSAndroid Build Coastguard Worker
24*9e3b08aeSAndroid Build Coastguard WorkerThe most useful option is `small`. Use `flat` if you need to see the impact on
25*9e3b08aeSAndroid Build Coastguard Workerthe interface symbols and types. Use `short` if large reports should be
26*9e3b08aeSAndroid Build Coastguard Workercondensed.
27*9e3b08aeSAndroid Build Coastguard Worker
28*9e3b08aeSAndroid Build Coastguard WorkerThe `flat` reporting and its derivatives will misbehave (go into an infinite
29*9e3b08aeSAndroid Build Coastguard Workerloop) in the current implementation, if the difference graph contains a cycle
30*9e3b08aeSAndroid Build Coastguard Workerwhere none of the nodes refers to a named type.
31