<?xml version="1.0" encoding="utf-8" standalone="yes"?><?xml-stylesheet href="/feed.css?v=208f42b55cff" type="text/css"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:site="https://lalitm.com/feed/ns#"><channel><title>Lalit Maganti (Tag: Open-Source)</title><link>https://lalitm.com/tags/open-source/</link><description>Recent content tagged Open-Source on Lalit Maganti</description><site:notice>This is a feed.
Feeds let you subscribe to updates from this site using a feed reader. Copy this page's URL from your address bar and paste it into your reader.
New to feeds? Read: https://aboutfeeds.com</site:notice><docs>https://aboutfeeds.com</docs><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sun, 07 Jun 2026 16:26:00 +0100</lastBuildDate><atom:link href="https://lalitm.com/tags/open-source/index.xml" rel="self" type="application/rss+xml"/><item><title>Security analysis is finally reaching software's long tail</title><link>https://lalitm.com/post/perfetto-security-bugs-ai/</link><pubDate>Sun, 07 Jun 2026 16:26:00 +0100</pubDate><guid>https://lalitm.com/post/perfetto-security-bugs-ai/</guid><description>This post was formerly titled “17 bugs in 10 weeks from AI security scanning”. It was changed upon feedback from trusted readers who suggested, while accurate, it did not give a good sense of what I’m actually arguing in the post.
Over the last several weeks, I’ve been receiving more security bug reports for Perfetto’s trace processor than I ever have before, all of them found by AI. And I’m very happy about it! These are bugs that would almost certainly not have been found a year ago and it feels good to close these loopholes even though trace processor is by no means security critical.
For years, security researchers concentrated their time on the highest-stakes targets: kernels, cryptography libraries, password managers. But there’s a lot of code out there which is security-relevant but not truly security-critical. In my experience, these sorts of projects didn’t draw much attention. Now systems in the long tail can get that attention which they wouldn’t have before.</description><content:encoded>&lt;p&gt;&lt;em&gt;This post was formerly titled &amp;ldquo;17 bugs in 10 weeks from AI security scanning&amp;rdquo;.
It was changed upon feedback from trusted readers who suggested, while accurate,
it did not give a good sense of what I&amp;rsquo;m &lt;em&gt;actually&lt;/em&gt; arguing in the post.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Over the last several weeks, I&amp;rsquo;ve been receiving more security bug reports for
Perfetto&amp;rsquo;s trace processor than I ever have before, all of them found by AI. And
I&amp;rsquo;m very happy about it! These are bugs that would almost certainly not have
been found a year ago and it feels good to close these loopholes even though
trace processor is by no means security critical.&lt;/p&gt;
&lt;p&gt;For years, security researchers concentrated their time on the highest-stakes
targets: kernels, cryptography libraries, password managers. But there&amp;rsquo;s a lot
of code out there which is security-relevant but not truly security-critical. In
my experience, these sorts of projects didn&amp;rsquo;t draw much attention. Now systems
in the long tail can get that attention which they wouldn&amp;rsquo;t have before.&lt;/p&gt;
&lt;h2 id="why-is-this-happening"&gt;Why is this happening&lt;a class="heading-anchor" href="#why-is-this-happening" aria-label="Permalink to Why is this happening"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Trace processor is a project which sits squarely in that long tail. It&amp;rsquo;s a C++
library (yes, Rust would be the obvious choice today but it&amp;rsquo;s not practical to
rewrite, see footnote &lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;) for processing recorded traces of various
formats. These are typically traces you collected yourself or in your test infra
and process offline so &amp;ldquo;untrusted input&amp;rdquo; isn&amp;rsquo;t much of a concern.&lt;/p&gt;
&lt;p&gt;However, some people &lt;em&gt;do&lt;/em&gt; process traces they didn&amp;rsquo;t collect themselves (e.g.
user bug reports, automated collection from dogfood users). For those cases
we&amp;rsquo;ve strongly recommended sandboxing trace processor (e.g.
&lt;a href="https://gvisor.dev/"&gt;gvisor&lt;/a&gt;,
&lt;a href="https://developers.google.com/code-sandboxing/sandbox2"&gt;sandbox2&lt;/a&gt;, or
&lt;a href="https://google.github.io/minijail/"&gt;minijail&lt;/a&gt;) or, for even more sensitive use
cases, a VM.&lt;/p&gt;
&lt;p&gt;Beyond sandboxing, for catching issues proactively, we mainly relied on fuzzing
running internally in Google. These fuzzers occasionally surfaced real,
actionable bugs: we set them up to pass in arbitrary trace bytes (as this is the
main &amp;ldquo;attack surface&amp;rdquo;) but over time these became quite rare as they discovered
much of the low hanging fruit, which we quickly fixed. The bugs that remained
tend to live deep in the internals, reachable only with a very precisely crafted
sequence of bytes that a fuzzer is unlikely to hit by mutation alone.&lt;/p&gt;
&lt;p&gt;Apart from this, there has rarely been any bandwidth or resources for a human,
either a security expert or someone from my team, to spend lots of time finding
security issues in trace processor. There were always other parts of Perfetto
more worth spending security time on (e.g. the tracing service, on-device
profilers) as they&amp;rsquo;re actively running in production systems.&lt;/p&gt;
&lt;p&gt;All of this changed as of a couple of months ago. We started receiving bug
reports filed by some central team which appears to be running AI-based security
scanning against various projects throughout Google. Unfortunately, I have to be
hand wavy about what exactly they&amp;rsquo;re doing as their work doesn&amp;rsquo;t appear to be
public.&lt;/p&gt;
&lt;p&gt;Starting in early April, we had a slow drip of 1 bug a week, but since the end
of April this increased to a rate of several a week, with some days having 3 or
4 being opened in quick succession. This lasted until mid-May, at which point it
started tapering back to 1-2 a week with some weeks having none.&lt;/p&gt;
&lt;p&gt;I also want to say that the quality of the bugs is high. They&amp;rsquo;re well-described,
often with the relevant attacker model already worked out and even minimal fixes
proposed: basically everything I could ask for from a bug report. This matches
what both &lt;a href="https://daniel.haxx.se/blog/2026/04/22/high-quality-chaos/"&gt;curl&lt;/a&gt; and
&lt;a href="https://www.theregister.com/2026/03/26/greg_kroahhartman_ai_kernel/"&gt;Linux kernel&lt;/a&gt;
maintainers have noted about security bugs they&amp;rsquo;ve received, especially how
sharply quality has improved in the last few months.&lt;/p&gt;
&lt;p&gt;As I can only see the bugs that get filed against me, not the raw output of the
AI scanner, I don&amp;rsquo;t know exactly how much triage happens upstream. My guess is
there&amp;rsquo;s a human doing a light pass to drop obvious noise before reports reach
client teams, but judging from the rate at which bugs are opened and the way
they&amp;rsquo;re filed, I doubt anyone is deeply triaging each one.&lt;/p&gt;
&lt;p&gt;In total, we&amp;rsquo;ve received &lt;strong&gt;21&lt;/strong&gt; bugs (17 real issues and 4 not actionable),
which can be broken down into the following categories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;10 bounds checking&lt;/strong&gt;: arbitrary trace data flowing into fixed-size buffers
or unchecked array indices, leading to out-of-bounds reads or writes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;5 use-after-free&lt;/strong&gt;: back-pointers, pointer snapshots, or hashmap keys
outliving the object they refer to.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1 stack overflow&lt;/strong&gt;: unbounded recursion when input is deeply nested.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1 access control&lt;/strong&gt;: not enforcing allowlists on some rare codepaths.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;4 closed as not actionable&lt;/strong&gt;: either where the chance of exploit was purely
hypothetical or where fixing would have required fundamental design changes
which were not worth the tiny security risk.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All 17 real issues have been fixed, almost all shipping in Perfetto v56.0
&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;h2 id="how-it-feels-to-get-a-report"&gt;How it feels to get a report&lt;a class="heading-anchor" href="#how-it-feels-to-get-a-report" aria-label="Permalink to How it feels to get a report"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;How does receiving one of these reports actually feel? Well not as bad as you&amp;rsquo;d
think. Unlike a security-critical application like OpenSSL or curl, in trace
processor, a security issue is very unlikely to be a P0 I have to drop
everything to fix. Don&amp;rsquo;t get me wrong, it&amp;rsquo;s still a priority but one where I
have the luxury of taking a few days to figure out the right answer and can
release fixes according to our normal schedule, instead of trying to rush out a
CVE and get everyone to patch immediately.&lt;/p&gt;
&lt;p&gt;Also thankfully, because the majority of the issues are mechanical, the fixes
are generally quite straightforward.
&lt;a href="https://github.com/google/perfetto/pull/5586"&gt;Take this PR&lt;/a&gt;, for example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We build a key string into a fixed-size stack buffer while parsing some
metadata.&lt;/li&gt;
&lt;li&gt;The bounds check only runs in debug builds, and the metadata name comes
straight from the trace. Putting a long enough name means you would escape the
buffer.&lt;/li&gt;
&lt;li&gt;The fix is a simple matter of swapping the stack buffer for a std::string. The
code path is very cold (only once or twice in a trace) so the extra heap
allocation doesn&amp;rsquo;t matter.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In fact, these sorts of issues are &lt;em&gt;so&lt;/em&gt; mechanical that I trust a coding agent
to just fix them with minimal guidance: take the well-written report, feed it to
the agent, and within ~10 minutes there&amp;rsquo;s a 10-20 line PR which fixes it. I
review every line thoroughly and make sure I understand it, but these tasks are
not difficult and firmly &lt;em&gt;inside&lt;/em&gt; the &amp;ldquo;jagged frontier&amp;rdquo; of what AI can do.&lt;/p&gt;
&lt;p&gt;I want to stress though that not every issue is mechanical or can be left to AI;
a few reports actually point more to design problems than incorrect function
implementations.
&lt;a href="https://github.com/google/perfetto/pull/5593"&gt;This use after free&lt;/a&gt; is a good
example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The problem was a state object held a back-pointer that could end up pointing
to freed memory given certain data appearing in the trace.&lt;/li&gt;
&lt;li&gt;The immediate dangling case was easy to patch by just having a callback which
invalidated the back-pointer on free. But this is a horrible hack which makes
the lifetimes of the objects involved impossible to reason about.&lt;/li&gt;
&lt;li&gt;The real problem here is that you had a child object whose parent could go
away before it, which really shouldn&amp;rsquo;t happen if this code is properly
architected.&lt;/li&gt;
&lt;li&gt;Fixing it properly meant restructuring the ownership model so the lifetime was
correct by construction.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The interesting thing was that this was a problem I was aware of and that I had
been meaning to clean up for close to a year but never got round to: the
security bug just gave me the push and justification to do it. This applied in a
couple of other bugs as well and made me internalize that security issues can
sometimes be correlated with deeper design flaws or hacky code so there are
wider benefits to &amp;ldquo;security scanning&amp;rdquo; than just the direct bugs they find.&lt;/p&gt;
&lt;h2 id="will-this-last"&gt;Will this last?&lt;a class="heading-anchor" href="#will-this-last" aria-label="Permalink to Will this last?"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;One thing I am wary of is how long this stream of bugs will keep up; I&amp;rsquo;m feeling
good about it given it&amp;rsquo;s only been going on for a couple of months, but I can
easily imagine that if this goes on for several more months, it might become
mentally exhausting.&lt;/p&gt;
&lt;p&gt;But my suspicion is that this will go to zero. Why? It&amp;rsquo;s to do with the pattern
of how these bugs are being filed. Each part of the codebase seems like it&amp;rsquo;s
getting a day or two of attention (and associated bugs) before moving on to a
different part. Repeats are rare, and the pace of bugs has slowed especially in
the last couple of weeks: we had a lot more in the start of May (several a week)
but now we&amp;rsquo;re down to 1-2 a week. There are a finite number of files, so
eventually my gut tells me they will run out.&lt;/p&gt;
&lt;p&gt;An important consideration is whether we&amp;rsquo;ll add new bugs faster than the scanner
can find old ones. My suspicion is no; the 17 real issues so far are from
scanning across 9 years of development. Even if that number triples before
things settle, the scanner is still working through years of accumulated code.
And we wrote a lot more code, a lot faster, in the earlier years of the project,
so the rate of new code being added now is lower than it once was.&lt;/p&gt;
&lt;p&gt;The other question is whether new model releases will find more complex design
issues rather than the simple issues we&amp;rsquo;re finding today. Those take
significantly more time and effort to fix and so would be a lot more painful if
we were to get many of those. I&amp;rsquo;m very unsure on this so we&amp;rsquo;ll just have to wait
and see!&lt;/p&gt;
&lt;h2 id="where-this-leaves-us"&gt;Where this leaves us&lt;a class="heading-anchor" href="#where-this-leaves-us" aria-label="Permalink to Where this leaves us"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;I feel Daniel Stenberg (curl maintainer) phrased it well in this
&lt;a href="https://daniel.haxx.se/blog/2026/05/11/mythos-finds-a-curl-vulnerability/"&gt;post&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Any project that has not scanned their source code with AI powered tooling
will likely find huge number of flaws, bugs and possible vulnerabilities with
this new generation of tools.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This rings very true to me. More broadly, I think folks will have one of three
experiences:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Untrusted input + security critical&lt;/em&gt; (e.g. curl, kernel, OpenSSL): many
complex reports, with a higher false positive rate than the other categories,
because there&amp;rsquo;s a lot of attention on the project and much of the low hanging
fruit would already have been picked in the critical codepaths. Though
codepaths for lesser-used functionality (e.g. legacy drivers) could end up in
category 2 instead.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Untrusted input + not previously audited&lt;/em&gt; (e.g. trace processor): a wave of
mechanical bugs at a manageable pace and low individual stress because the
project is not on a security critical code path. This is where both Daniel
and I expect AI security scanners to have the most impact.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;No untrusted input&lt;/em&gt; (internal tools, math libs, anything operating only on
trusted data): you probably won&amp;rsquo;t notice this shift at all.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;My own case sits squarely in that second bucket. But I don&amp;rsquo;t want to
over-generalize from my experience, because there are three things that make
this manageable for me that wouldn&amp;rsquo;t be true for everyone: a) I&amp;rsquo;m paid to
maintain trace processor as part of my full time job; b) someone else is taking
the effort to run the AI scans and discover the bugs in the first place; c) the
reports appear to be lightly filtered by an upstream human reviewer, enough to
strip obvious noise but probably not a deep triage.&lt;/p&gt;
&lt;p&gt;To me, this points to a gap in the ecosystem: most open-source projects cannot
afford to have a dedicated team doing security scanning for them, and telling a
maintainer to stand up their own pipeline when their security risk is marginal
will restrict this to only the most motivated projects. I would guess we&amp;rsquo;re
going to see a lot more innovation in this space, including from the big AI
labs.&lt;/p&gt;
&lt;p&gt;All in all, I&amp;rsquo;m cautiously positive about my own experience: most of the bugs
are mechanical, a few have nudged long-overdue design cleanups, and the pace is
manageable. There&amp;rsquo;s plenty I don&amp;rsquo;t know about how this evolves: whether the pace
holds, whether future models start finding harder design issues. So this should
very much be treated as a snapshot, not a forecast!&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;A common response I expect is: &amp;ldquo;if it&amp;rsquo;s parsing arbitrary binary data like
traces, it should be written in Rust.&amp;rdquo; In a vacuum I agree and if I was
writing trace processor from scratch today, I would definitely use Rust. But
&lt;em&gt;switching&lt;/em&gt; to Rust is unfortunately quite impractical; the library is a
significant amount of code and is embedded in hundreds of downstream tools,
many in environments that don&amp;rsquo;t have a Rust toolchain. Asking all our
embedders to start using Rust would be a significant burden and one I don&amp;rsquo;t
want to impose. Not to mention that our team doesn&amp;rsquo;t actually have any Rust
expertise so reviewing this code at a standard I want from trace processor
would be a significant productivity hit until folks got up to speed. And
unlike others in the industry, I don&amp;rsquo;t feel comfortable just rewriting the
whole project in one shot and calling it a day&amp;hellip;&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;The couple of remaining bugs were found after the v56.0 release was cut and
are low-priority enough that it&amp;rsquo;s not worth rushing out a release for them.
They have already been fixed on main and will be fixed in an upcoming point
release.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content:encoded></item><item><title>On Perfetto, Open Source, and Company Priorities</title><link>https://lalitm.com/perfetto-oss-company-prio/</link><pubDate>Fri, 17 Oct 2025 15:00:00 +0100</pubDate><guid>https://lalitm.com/perfetto-oss-company-prio/</guid><description>I recently stumbled across this post on lobste.rs about a project called traceboot which allows visualizing the Linux boot process using lightweight ftrace events and Perfetto. The author had some commentary about their experience trying to order tracks in Perfetto:
Ordering tracks with perfetto has been ridiculously complicated. It has taken the majority of the time of this project! Upstream’s answers are basically that the main user is Android (Perfetto is a Google project) so others come second if at all. While I get the reasons to do so, I read that as a caution against depending on it as a third-party. Google is notorious for (…) completely killing projects
Honestly? All of these points are right:
It is really unfortunate that doing something so simple took so much effort. It’s true that external users are supported at a lower priority than Android users. It’s also the case that Google has historically wound down projects when priorities shift The good news is that we just landed support for trace writers to specify explicitly how traces should be ordered with the JSON format in Perfetto without any extreme workarounds! This feature is already available on the “Canary” UI channel and on “Stable” within 3-4 weeks.</description><content:encoded>&lt;p&gt;I recently stumbled across
&lt;a href="https://lobste.rs/s/fl7ly9/traceboot_precise_lightweight_tracing"&gt;this post on lobste.rs&lt;/a&gt;
about a project called
&lt;a href="https://codeberg.org/SpecialSnowflake/traceboot"&gt;traceboot&lt;/a&gt; which allows
visualizing the Linux boot process using lightweight ftrace events and Perfetto.
The author had
&lt;a href="https://codeberg.org/SpecialSnowflake/traceboot#woes-with-a-rant-and-ideas-last-paragraph-of-this-section"&gt;some commentary&lt;/a&gt;
about their experience trying to order tracks in Perfetto:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Ordering tracks with perfetto has been ridiculously complicated. It has taken
the majority of the time of this project! Upstream&amp;rsquo;s answers are basically
that the main user is Android (Perfetto is a Google project) so others come
second if at all. While I get the reasons to do so, I read that as a caution
against depending on it as a third-party. Google is notorious for (&amp;hellip;)
completely killing projects&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Honestly? All of these points are right:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It is really unfortunate that doing something so simple took so much effort.&lt;/li&gt;
&lt;li&gt;It&amp;rsquo;s true that external users are supported at a lower priority than Android
users.&lt;/li&gt;
&lt;li&gt;It&amp;rsquo;s also the case that Google has historically wound down projects when
priorities shift&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The good news is that we just
&lt;a href="https://github.com/google/perfetto/pull/3273"&gt;landed&lt;/a&gt; support for trace
writers to specify explicitly how traces should be ordered with the JSON format
in Perfetto without any extreme workarounds! This feature is already available on
the &amp;ldquo;Canary&amp;rdquo; UI channel and on &amp;ldquo;Stable&amp;rdquo; within 3-4 weeks.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://lalitm.com/img/perfetto-json-ordering.png" alt="Json Track ordering in action!"&gt;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;i&gt;process_sort_index and thread_sort_index are now respected by Perfetto!&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;So we solved the imediate problem! But here&amp;rsquo;s what concerns me: I found this
issue totally by chance while browsing lobste.rs. There were several issues
filed in the Perfetto repo over several years asking for this feature
(&lt;a href="https://github.com/google/perfetto/issues/555"&gt;#555&lt;/a&gt;,
&lt;a href="https://github.com/google/perfetto/issues/764"&gt;#764&lt;/a&gt;,
&lt;a href="https://github.com/google/perfetto/issues/378"&gt;#378&lt;/a&gt;) but none of them managed
to communicate to us just how painful this issue was and the lengths people were
willing to go to work around it. Seeing the annoyance in such stark terms
definitely put into perspective the importance of this feature.&lt;/p&gt;
&lt;p&gt;You might be thinking: &amp;ldquo;surely if a feature is requested that much, you should
consider it important and work on fixing it&amp;rdquo;. And for a general open source
project, I&amp;rsquo;d agree with you. But there are some unique challenges which come
with being an open source project under the umbrella of a Big Tech company.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s all about how the Perfetto team fits into Google. We&amp;rsquo;re part of the Android
Diagnostics organization whose mandate is to build tools and systems to
root-cause problems on Android. Performance debugging would be impossible
without a system-wide tracing tool like Perfetto (which is why we even exist at
all!). But because we are funded by Android, it&amp;rsquo;s also expected that we
prioritise its needs.&lt;/p&gt;
&lt;p&gt;However, I, and others in the team, also deeply believe in the mission of open
source. We want to build something useful not just for Android engineers inside
Google but for the broader community as a whole. That creates a tension we
struggle with constantly: we value external users and their use cases, but the
reality of our team&amp;rsquo;s existence means Google&amp;rsquo;s priorities often win out.&lt;/p&gt;
&lt;p&gt;This tension is compounded by the fact that different types of users want
fundamentally different things from Perfetto. If you use Perfetto purely as a
trace viewer, the expectation is &amp;ldquo;I write the trace file and the Perfetto UI
should display exactly what I want&amp;rdquo;. But Android OS and app developers expect
&amp;ldquo;Perfetto should intelligently figure out what is most important in my trace and
highlight that to me.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;In the early days of Perfetto, we took on a lot of technical debt to meet the
immediate needs of Android developers. We built an &amp;lsquo;intelligence&amp;rsquo; layer that
automatically reordered tracks based on Android-specific heuristics. This was
great for our primary users, but it made it immensely difficult to later support
features for the &amp;lsquo;pure trace viewer&amp;rsquo; use case, like manually ordering tracks via
the JSON file, because the Android logic would always override it.&lt;/p&gt;
&lt;p&gt;The good news is that over the past 12 months, we&amp;rsquo;ve spent a lot of time trying
to decouple the &amp;ldquo;core&amp;rdquo; layer of Perfetto UI from the &amp;ldquo;intelligence&amp;rdquo; layer for
Android. This separation means we can now preserve the original intent from the
trace format (like &amp;ldquo;this track should be ordered here&amp;rdquo;) all the way to the UI,
rather than having it get lost or overridden by Android-specific heuristics
along the way. This allows us to build features like JSON track ordering without
creating impossible-to-maintain code that hurts us in the long run.&lt;/p&gt;
&lt;p&gt;It’s also understandable that people worry about Google’s project longevity.
Thankfully Perfetto&amp;rsquo;s core design principles of a) being 100% open source b)
fully client side significantly mitigate these risks. For example, running the
Perfetto UI is as simple as cloning the repo, running
&lt;code&gt;tools/install-build-deps --ui &amp;amp;&amp;amp; ui/run-dev-server&lt;/code&gt; and navigating to
&lt;code&gt;localhost:10000&lt;/code&gt;. The site is entirely static capable of being hosted anywhere.
There is no &amp;ldquo;backend server&amp;rdquo; to be taken down, everything runs in your browser
only. So if for some reason, if the Perfetto team was to disappear, it would be
trivially easy to host it yourself or even fork the project completely and start
maintaining it.&lt;/p&gt;
&lt;p&gt;With all that said, here are my takeaways from this experience:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;There are still painpoints lurking in issues from the past that external
users are still hitting today. We should maybe do a pass over historical bugs
and figure out what issues are hiding there.&lt;/li&gt;
&lt;li&gt;Moving forward, we need to be more transparent and communicative about &lt;em&gt;why&lt;/em&gt;
we&amp;rsquo;re not prioritising a certain issue. I feel our terse replies about our
priorities are giving misleading indications on the value we place on
external users. Maybe we should also be more open about what we &lt;em&gt;are&lt;/em&gt;
prioritizing, even if that means we have to say &amp;ldquo;we&amp;rsquo;re not going to be able
to do much for external users this quarter&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;We also need to set up a regular routine for going through our bug tracker
and checking &amp;ldquo;has anything changed which now makes this bug possible&amp;rdquo; and if
so, we should follow up and post on the issue to make everyone aware of this
and keep bugs up to date.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here&amp;rsquo;s also where community help would be invaluable: if you&amp;rsquo;re facing an issue
with Perfetto, tell us on &lt;a href="https://github.com/google/perfetto/issues/new"&gt;Github&lt;/a&gt; or on our
&lt;a href="https://groups.google.com/g/perfetto-dev"&gt;mailing list&lt;/a&gt;! Comment on old bugs if
one already exists or file new ones if they don&amp;rsquo;t. Bonus points if you can tell
us why the issue is so painful for you and what you&amp;rsquo;re doing to work around it
if it&amp;rsquo;s not fixed. The more information we have, the better judgement calls we
can make on prioritization.&lt;/p&gt;</content:encoded></item></channel></rss>