{"id":298,"date":"2009-04-29T18:32:38","date_gmt":"2009-04-29T23:32:38","guid":{"rendered":"http:\/\/www.visophyte.org\/blog\/?p=298"},"modified":"2009-04-29T18:32:38","modified_gmt":"2009-04-29T23:32:38","slug":"displaying-execution-traces-on-a-simile-timeline","status":"publish","type":"post","link":"https:\/\/www.visophyte.org\/blog\/2009\/04\/29\/displaying-execution-traces-on-a-simile-timeline\/","title":{"rendered":"displaying execution traces on a SIMILE timeline"},"content":{"rendered":"<p><a href=\"http:\/\/clicky.visophyte.org\/examples\/chroniquery\/20090429-01\/eventline.html#253000000\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-299\" title=\"chronimoz-timeline-1\" src=\"http:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2009\/04\/chronimoz-timeline-1.png\" alt=\"chronimoz-timeline-1\" width=\"639\" height=\"225\" srcset=\"https:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2009\/04\/chronimoz-timeline-1.png 639w, https:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2009\/04\/chronimoz-timeline-1-600x211.png 600w, https:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2009\/04\/chronimoz-timeline-1-300x105.png 300w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.visophyte.org\/blog\/tag\/chroniquery\/\">chroniquery<\/a> can now output JSON for display using the <a href=\"http:\/\/www.simile-widgets.org\/timeline\/\">SIMILE timeline widget<\/a>.\u00a0 And I am finally done trying to figure out what was going wrong.\u00a0 Click the pictures to experience the timeline sensation for yourself.<\/p>\n<p>Related interesting things:<\/p>\n<ul>\n<li>Supports a fancy if specific constraint mechanism.\u00a0 For example, PrepareAndDispatch is only displayed in the context of nsTimerImpl::Fire using the following line in the config file:<\/li>\n<\/ul>\n<pre>[func@PrepareAndDispatch]\r\nonly_show_if=backtrace,4,nsTimerImpl::Fire<\/pre>\n<ul>\n<li>Supports displaying arguments in the title using the config file.\u00a0 For example, displaying the observer service&#8217;s topic (plus putting it in its own band and giving it a nice prefix):<\/li>\n<\/ul>\n<pre>[class@nsObserverService]\r\nprefixAlias=Obs:\r\nband=context\r\nlist_args=aTopic<\/pre>\n<ul>\n<li>We actually get the dump() output by logging where _IO_fputs shows up.\u00a0 We constrain its output by adding an extensible (if currently somewhat specialized) argument-based constraint.<\/li>\n<li>Things in red are red because their return codes were exceptional, per <a href=\"http:\/\/www.visophyte.org\/blog\/2009\/04\/28\/understanding-where-unit-tests-go-wrong-with-object-diffs\/\">my last blog post<\/a>.\u00a0 Things in other colors are that way because of the config file.<\/li>\n<li>The bubbles that show up when you click on things tell you the return value and arguments for the call in question.\u00a0 We could include a backtrace, but they are expensive to compute (currently), so I don&#8217;t.<\/li>\n<li>All layout is using the timeline widget&#8217;s layout.\u00a0 There is no correspondence between stack depth and anything else.<\/li>\n<\/ul>\n<p><a href=\"http:\/\/clicky.visophyte.org\/examples\/chroniquery\/20090429-01\/eventline.html#253000000\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-300\" title=\"chronimoz-timeline-2\" src=\"http:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2009\/04\/chronimoz-timeline-2.png\" alt=\"chronimoz-timeline-2\" width=\"640\" height=\"275\" srcset=\"https:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2009\/04\/chronimoz-timeline-2.png 640w, https:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2009\/04\/chronimoz-timeline-2-600x257.png 600w, https:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2009\/04\/chronimoz-timeline-2-300x128.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>An important limitation is that all functions displayed here were explicitly chosen for display.\u00a0 Some form of automated mechanism could be used, but unless chronicle-query starts caching more things, it would be really slow.\u00a0 Here&#8217;s the command-line used for the above:<\/p>\n<p>chron-xpc mozrun-9022.db jsontrace -t 1 -f nsObserverService::NotifyObservers -f nsThread::ProcessNextEvent -f nsTimerImpl::Fire -f nsMsgSearchSession::NotifyListenersDone -f nsMsgDBFolder::Shutdown\u00a0 -f nsMsgLocalMailFolder::AddMessage -f nsMsgDatabase::Open -f nsMsgDatabase::ForceClosed -f nsMsgLocalMailFolder::GetDatabaseWithReparse -f nsMsgDBFolder::OnAnnouncerGoingAway -f nsMsgDBFolder::AddSubfolder -f nsMsgSearchOfflineMail::OpenSummaryFile -f nsMsgSearchSession::TimerCallback -f nsMsgSearchSession::TimeSlice -f nsMsgSearchSession::TimeSliceSerial -f nsMsgSearchScopeTerm::TimeSlice -f nsMsgXFVirtualFolderDBView::Open -f nsMsgXFVirtualFolderDBView::OnNewSearch -f nsMsgXFVirtualFolderDBView::OnSearchDone\u00a0 -f js_GC -f PrepareAndDispatch -f nsMsgLocalMailFolder::UpdateFolder -f _IO_fputs<\/p>\n","protected":false},"excerpt":{"rendered":"<p>chroniquery can now output JSON for display using the SIMILE timeline widget.\u00a0 And I am finally done trying to figure out what was going wrong.\u00a0 Click the pictures to experience the timeline sensation for yourself. Related interesting things: Supports a &hellip; <a href=\"https:\/\/www.visophyte.org\/blog\/2009\/04\/29\/displaying-execution-traces-on-a-simile-timeline\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[16,7,8,4],"tags":[29,28,59],"class_list":["post-298","post","type-post","status-publish","format-standard","hentry","category-clicky","category-debugging","category-program-execution","category-visualizing","tag-chronicle","tag-chroniquery","tag-timeline"],"_links":{"self":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts\/298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/comments?post=298"}],"version-history":[{"count":4,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts\/298\/revisions"}],"predecessor-version":[{"id":304,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts\/298\/revisions\/304"}],"wp:attachment":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/media?parent=298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/categories?post=298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/tags?post=298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}