Hello Searchfox users!
We have multiple new features in Searchfox!
(1) (alpha-only) Template super classes in the class field layout table
Have you bumped into an issue with the class field layout table where
super classes are missing, or it shows strange holes?
It had been caused by the template classes in the class hierarchy,
where the analysis data for each specialization hadn't been generated.
We've fixed it, and now you can see the entire class hierarchy
even if there's template super class, as long as the queried class itself
is not templatized.
example:
https://searchfox.org/firefox-main/query/default?q=field-layout%3A%27JS%3A%3Aloader%3A%3AScriptLoadRequest%27 (LinkedListElement is a template class)
Also you can now reverse the order of classes, so that the fields are shown in the offset order across classes.
(2) Opt build data
Searchfox had been using the debug build's data as an input.
This of course covers debug-only functions and debug-only variable/fields,
but that was problematic for the class field layout table,
because the field offset/size can differ between debug builds and non-debug builds.
In the latest update, we've added opt builds as the input,
so that class field layout table now shows fields from both debug builds and opt builds,
and also you can see the generated files for opt builds.
Now you can look for possible memshrink opportunities, by checking holes in the classes, or by checking each field's size.
And also you can use the opt build's field offset while looking into crash reports,
in order to figure out which field the instruction is trying to touch.
(3) (alpha-only) GC hazard analyisis
In our automation, we're performing the hazard analysis, which checks if
all JS GC thing pointer variables are properly rooted with `JS::Rooted<T>` etc
when they live across GC.
https://firefox-source-docs.mozilla.org/js/HazardAnalysis/index.html
You can now see which function can GC, directly in Searchfox.
Clicking a function symbol (either definition or consumer) shows
"Can GC" or "Cannot GC" in the context menu, if it's found in the
hazard analysis.
Clicking the "Can GC" menu item shows the call path to possible GC.
The UI is experimental, and it's going to be brushed up in near future.
Feedback is welcome :)
For features available only in "Alpha" channel,
please choose "Alpha" gate in the settings page.
https://searchfox.org/firefox-main/pages/settings.html
(4) Linkify test manifest TOML files
The test manifest files such as `mochitest.toml` now link to each test,
and also support-files and head files.
example:
https://searchfox.org/firefox-main/source/dom/tests/browser/browser.toml
(5) Linkify moz.build files
Files and directories in moz.build files are also now linkified.
example:
https://searchfox.org/firefox-main/source/js/src/moz.build
(6) Add sticky header for the nesting structure in YAML files
Now yaml files have sticky header for each nesting, just like C++ and JavaScript files.
example:
https://searchfox.org/firefox-main/source/taskcluster/kinds/searchfox/kind.yml
If you find any issue, or if you have any improvement ideas, please let us know!
And one more news.
Searchfox is now listed in the Codetribute website!
If you're interested into improving Searchfox, please check it out :)
https://codetribute.mozilla.org/projects/searchfox
Thank you!
--
arai