@@ -29,6 +29,7 @@ import (
29
29
"github.com/google/syzkaller/pkg/html/pages"
30
30
"github.com/google/syzkaller/pkg/log"
31
31
"github.com/google/syzkaller/pkg/mgrconfig"
32
+ "github.com/google/syzkaller/pkg/report"
32
33
"github.com/google/syzkaller/pkg/stat"
33
34
"github.com/google/syzkaller/pkg/vcs"
34
35
"github.com/google/syzkaller/pkg/vminfo"
@@ -355,12 +356,33 @@ func makeUICrashType(info *BugInfo, startTime time.Time, repros map[string]bool)
355
356
triaged := reproStatus (info .HasRepro , info .HasCRepro , repros [info .Title ],
356
357
info .ReproAttempts >= MaxReproAttempts )
357
358
return UICrashType {
358
- BugInfo : * info ,
359
- New : info .FirstTime .After (startTime ),
360
- Active : info .LastTime .After (startTime ),
361
- Triaged : triaged ,
362
- Crashes : crashes ,
359
+ BugInfo : * info ,
360
+ RankTooltip : higherRankTooltip (info .Title , info .TailTitles ),
361
+ New : info .FirstTime .After (startTime ),
362
+ Active : info .LastTime .After (startTime ),
363
+ Triaged : triaged ,
364
+ Crashes : crashes ,
365
+ }
366
+ }
367
+
368
+ // higherRankTooltip generates the prioritized list of the titles with higher Rank
369
+ // than the firstTitle has.
370
+ func higherRankTooltip (firstTitle string , titlesInfo []* report.TitleFreqRank ) string {
371
+ baseRank := report .TitlesToImpact (firstTitle )
372
+ res := ""
373
+ for _ , ti := range titlesInfo {
374
+ if ti .Rank <= baseRank {
375
+ continue
376
+ }
377
+ res += fmt .Sprintf ("[rank %2v, freq %5.1f%%] %s\n " ,
378
+ ti .Rank ,
379
+ 100 * float32 (ti .Count )/ float32 (ti .Total ),
380
+ ti .Title )
381
+ }
382
+ if res != "" {
383
+ return fmt .Sprintf ("[rank %2v, originally] %s\n %s" , baseRank , firstTitle , res )
363
384
}
385
+ return res
364
386
}
365
387
366
388
var crashIDRe = regexp .MustCompile (`^\w+$` )
@@ -1024,10 +1046,11 @@ type UICrashPage struct {
1024
1046
1025
1047
type UICrashType struct {
1026
1048
BugInfo
1027
- New bool // was first found in the current run
1028
- Active bool // was found in the current run
1029
- Triaged string
1030
- Crashes []UICrash
1049
+ RankTooltip string
1050
+ New bool // was first found in the current run
1051
+ Active bool // was found in the current run
1052
+ Triaged string
1053
+ Crashes []UICrash
1031
1054
}
1032
1055
1033
1056
type UICrash struct {
0 commit comments