Issue of systrace parsing
Hi, I've observed a issue about systrace parsing, which displays different between perfetto web ui and systrace. In perfetto UI: each animator, deliverInput ...takes a track, while in systrace animators are cascaded, I think the systrace style is more friendly to users. I uploaded systrace html here: https://drive.google.com/open?id=13k7x2agWGb9T05e-VyRu_gIszaOAa_fo and images: https://drive.google.com/open?id=1DWGmX4ZkTeWmBVzbGHCdDAGuCauJ43rs https://drive.google.com/open?id=1Cif-HsDpd26GBIxdIWViYWnvvWAiKoJH
Could you help take a look at this?
This is a known issue. I fully agree, with your assessment, the squashing is strongly better. (TBH we always knew, it's just that it was trickier to implement right and we postponed it for a while) Good news, @chromy is working on it
@primiano That's great! And on my local build, I've got too large depth issue with same systrace file, is this the same issue?
[695.837] slice_tracker.cc:126 Slices with too large depth found. (errno: 0, Undefined error: 0)
------------------ BEGINNING OF CRASH ------------------
Signal: Illegal instruction (possibly unaligned access)
Fault addr: 00000001102BE471
Backtrace:
#00 _sigtramp
#01 perfetto::trace_processor::SliceTracker::StartSlice(long long, perfetto::trace_processor::tables::TrackTable::DefinedId, std::__1::function<void (perfetto::trace_processor::ArgsTracker::BoundInserter*)>, std::__1::function<perfetto::trace_processor::table
#02 perfetto::trace_processor::SliceTracker::Begin(long long, perfetto::trace_processor::tables::TrackTable::DefinedId, perfetto::trace_processor::StringPool::Id, perfetto::trace_processor::StringPool::Id, std::__1::function<void (perfetto::trace_processor::A
#03 perfetto::trace_processor::SystraceParser::ParseSystracePoint(long long, unsigned int, perfetto::trace_processor::systrace_utils::SystraceTracePoint)
#04 perfetto::trace_processor::SystraceParser::ParsePrintEvent(long long, unsigned int, perfetto::base::StringView)
#05 perfetto::trace_processor::SystraceTraceParser::ParseSingleSystraceEvent(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
#06 perfetto::trace_processor::SystraceTraceParser::Parse(std::__1::unique_ptr<unsigned char [], std::__1::default_delete<unsigned char []> >, unsigned long)
#07 perfetto::trace_processor::ForwardingTraceParser::Parse(std::__1::unique_ptr<unsigned char [], std::__1::default_delete<unsigned char []> >, unsigned long)
#08 perfetto::trace_processor::TraceProcessorStorageImpl::Parse(std::__1::unique_ptr<unsigned char [], std::__1::default_delete<unsigned char []> >, unsigned long)
#09 perfetto::trace_processor::TraceProcessorImpl::Parse(std::__1::unique_ptr<unsigned char [], std::__1::default_delete<unsigned char []> >, unsigned long)
#0A perfetto::trace_processor::ReadTrace(perfetto::trace_processor::TraceProcessor*, char const*, std::__1::function<void (unsigned long long)> const&)
#0B perfetto::trace_processor::(anonymous namespace)::TraceProcessorMain(int, char**)
That seems a different issue. @tilal6991 might be able to comment more. Feels like you are getting too many begin-slices without matching ends
Looking into why this is happening. At first glance on a release build, I'm not seeing a massively high depth which indicates that primiano is probably right (as we would drop these events).
Tried to repro on a debug build and I don't see the crash linked above.
@nians how are you building and running the trace processor?
same problem. I produced pb file, it can be shown in https://ui.perfetto.dev/#!/viewer, but not in my built. it reported:

pb file address: https://drive.google.com/file/d/10FwASlpDosTzShbVu_vK6_puSYRC0ETv/view?usp=sharing
@kyleada are you building a debug build? I looked at your trace on ui.perfetto.dev and you have some very deep slice stacks in that trace which is causing trace processor to reject the trace on debug builds.
@tilal6991 thanks, yes, it worked well when I tried to use --args='is_debug=false'. But why stack depth is limited on debug builds? how can I remove this limit, deep slice is also common when I collect simplerperf info.
Moving forward, we will move the stack samples out of the slice tables and into dedicated tables for them. At that point, we will be able to remove the restriction on depth of samples.
@rsavitski is tackling that work - I think there is active work on it but I don't want to give an exact timeframe on when it will be ready.
The initial issue where we make 100s of tracks for async events like animator should now be fixed.
I think stack samples are now no longer in the slcie tables so we should be able to mark this as fixed.