-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Profile queries #43156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Profile queries #43156
Changes from 17 commits
Commits
Show all changes
184 commits
Select commit
Hold shift + click to select a range
177f9f9
add '-Z profile-queries' debug flag
46e04f1
send QueryBegin message on channel; TODO-Send: actually create the ch…
dfa863c
profile_queries_msg macro; all messages in place
aa5becd
spawning thread, but getting the compiler to overflow in some checks:…
86fb705
avoid tcx lifetime in the inter-thread profile-queries messages
9d71b21
add control messages (halt and dump); parse traces to dump
741376b
basic HTML output
d8569eb
profile-queries: test runs; debugging; now crashes with 'cannot acces…
947c1a7
detect closed channel; text with query constructor string in final HTML
84b880d
Add hint about the return code of panic!
dns2utf8 b4ceece
add CSS style to rust code; change filename to 'profile_queries.html'
8861084
tidiness checks pass
5fe6b2a
profile-queries: durations in HTML output
a4b788d
profile queries: time as fractions of total
90c4427
profile-queries: create counts file
413290b
profile-queries: aggregate counts and durations for queries
8205c34
Note different versions of same crate when absolute paths of differen…
Yorwba 21bb60a
Replace `grep -z` by `tr -d '\r\n' | grep` for cross-compatibility
Yorwba 01b6c94
Implement Eq/Hash/Debug etc. for unsized tuples.
qnighy 728d26c
Add a test for unsized tuple impls.
qnighy d539057
Insert current implementation header
dns2utf8 9e001ce
Be more specific about the implications of the panic!
dns2utf8 05d3526
`rustc_on_unimplemented` supports referring to trait
estebank 010dea1
Stabilize float_bits_conv
est31 28ce292
Add `isize` and `usize` constructors to Literal
alexcrichton 4d58b04
Redox: add stat methods(); support is_symlink()
ids1024 6008004
Only match a fragment specifier the if it starts with certain tokens.
kennytm bca8570
incr.comp.: Don't include span information in the ICH of type definit…
michaelwoerister b8b4f56
Update compiler_builtins submodule for probestack fix
alexcrichton c6b280e
Add warning to BufWriter documentation
f2566bb
Correct some stability attributes
ollie27 2557800
Split DepNode::ItemSignature into non-overlapping variants.
michaelwoerister ca0a403
incr.comp.: Improve debug output for work products.
michaelwoerister 9808661
Add StableHash implementation for ty::Instance.
michaelwoerister e00bec2
Allow 'tcx in define_dep_nodes! and deduplicate some DepNodes.
michaelwoerister f8b774f
Deduplicate DepNode::ConstEval()
michaelwoerister 13e87d1
Fix some `tidy` errors.
michaelwoerister 089860b
incr.comp.: Manage dependency graph on main thread.
michaelwoerister 0363a23
incr.comp.: Introduce the concept of anonymous DepNodes.
michaelwoerister 6d049fb
incr.comp.: Cache DepNodes with corresponding query results.
michaelwoerister 37f56a2
Use similar compression settings as before updating to use flate2
oyvindln 4f1f671
don't panic in `dep_node_debug_str` if `self.data` is `None`
nikomatsakis 01c6437
tweaks; tidy
9228d23
Auto merge of #43028 - michaelwoerister:dedup-dep-nodes, r=nikomatsakis
bors bc8733f
update .mailmap
zackmdavis 32ae12b
Add LocalKey::try_with as an alternative to state
PlasmaPower 77bd4dc
Disable big-endian simd in swap_nonoverlapping_bytes
cuviper a45c8b0
Use LocalKey::try_with in std
PlasmaPower 1999bfa
Auto merge of #42913 - kennytm:fix-40569-ident-without-backtrack, r=j…
bors a1f180b
Auto merge of #43147 - oyvindln:deflate_fix, r=alexcrichton
bors 18712e6
compiletest: Refactor: Move the `ignore-{}` logic into its own method.
kennytm ef26f17
Clean up some code
GuillaumeGomez 24a5cea
tweak word ordering
nikomatsakis 0cf8f85
fail in case nothing to run was found
GuillaumeGomez 4582ecd
compiletest: Support custom normalization rules.
kennytm 34209b0
Merge ui/README.md into COMPILER_TESTS.md and describe how custom UI …
kennytm dddf24d
Auto merge of #43006 - GuillaumeGomez:e0611-cleanup, r=nikomatsakis
bors a148f5b
Enable profiler on "alternate" builds
SimonSapin 7109d03
Allow setting the limit on std::io::Take.
Mark-Simulacrum 687ee7f
Downgrade ProjectionTy's TraitRef to its substs
tbg 133c1bc
Wrap long line
dns2utf8 8b5549d
Fix @alexcrichton comments
PlasmaPower 1475e2c
Auto merge of #42388 - tschottdorf:projty-substs, r=nikomatsakis
bors 9475ae4
Auto merge of #43116 - alexcrichton:probestack, r=sfackler
bors bac4bb9
Refactor methods onto Printer struct.
Mark-Simulacrum 16b486c
Refactor cur_cmnt_and_lit away.
Mark-Simulacrum 0343136
Make a few functions non-public
Mark-Simulacrum 40f03a1
Refactor call_with_pp functions to not take a payload.
Mark-Simulacrum b6a2d7e
support pub(restricted) in thread_local!
durka 8cce5bc
use :vis in thread_local!
durka 8e7c488
stage0 fallback
durka f9f4707
let #[allow_internal_unstable] cover :vis
durka b360b44
Auto merge of #43083 - kennytm:fix-42434-custom-stdxxx-normalization,…
bors 51260f4
Redox: Use O_NOFOLLOW for lstat()
ids1024 62b2e54
Refactor: {Lvalue,Rvalue,Operand}::ty only need the locals' types, no…
RalfJung cd71ea7
Auto merge of #43056 - ids1024:nofollow2, r=burntsushi
bors 4871dba
update crate dependencies
steveklabnik d1f1f86
Auto merge of #42936 - steveklabnik:update-mdbook, r=alexcrichton
bors 8ac29bd
Auto merge of #42697 - Mark-Simulacrum:take-limit, r=aturon
bors a260baa
Reintroduce expansion info for proc macros 1.1
oli-obk 8bba5ad
Auto merge of #43107 - michaelwoerister:less-span-info-in-debug, r=ni…
bors 4f030d0
integrate anon dep nodes into trait selection
nikomatsakis b2b19ec
Auto merge of #42897 - Mark-Simulacrum:pretty-print-refactor, r=jseyf…
bors ecf62e4
[LLVM] Avoid losing the !nonnull attribute in SROA
arielb1 500518a
Rollup merge of #42670 - dns2utf8:panic_return_code, r=steveklabnik
Mark-Simulacrum 0926f9b
Rollup merge of #42826 - Yorwba:type-mismatch-same-absolute-paths, r=…
Mark-Simulacrum 1a7dc0a
Rollup merge of #43000 - estebank:on-unimplemented-path, r=arielb1
Mark-Simulacrum e5288c9
Rollup merge of #43011 - qnighy:unsized-tuple-impls, r=aturon
Mark-Simulacrum 2510116
Rollup merge of #43098 - alexcrichton:more-proc-macro, r=jseyfried
Mark-Simulacrum 6aeb0f0
Rollup merge of #43100 - ids1024:stat2, r=aturon
Mark-Simulacrum cc20ab1
Rollup merge of #43136 - jgallag88:bufWriterDocs, r=steveklabnik
Mark-Simulacrum 388fce9
Rollup merge of #43137 - ollie27:stab, r=aturon
Mark-Simulacrum f86e433
Add regression tests to ensure stable drop order
aochagavia 2dcbef7
Add the Code of Conduct to the repository.
steveklabnik 38df82d
Tweak the CoC to point to the online version.
steveklabnik a301f84
Use try_with for with implementation
PlasmaPower 1a694fe
move trace and profile logic into sep mod; move init logic into commo…
f85579d
Auto merge of #43181 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors a01c91c
Document error coercion to false in path-ext methods + see also sections
Havvy 66fce33
overload the mir ty methods to make them more ergonomic to use
RalfJung e1ad190
rename trait to conform with 'getter trait' pattern
RalfJung 0bbc315
please tidy by shortening lines
RalfJung b7a4c54
Change language in Travis configuration to shell
Mark-Simulacrum 2503461
Updated docker images to factor out common scripts
Ophirr33 0d617ce
Update tcp.rs
jackpot51 bd9428a
Update mod.rs
jackpot51 362dd8a
Update fs.rs
jackpot51 21f2ace
Update mod.rs
jackpot51 4259ae6
Update fs.rs
jackpot51 cfd4c81
Auto merge of #43198 - rust-lang:travis-shell, r=alexcrichton
bors 06ffdeb
Auto merge of #43129 - Ophirr33:master, r=alexcrichton
bors b2c0707
Auto merge of #43158 - PlasmaPower:thread-local-try-with, r=alexcrichton
bors cb92ab9
Reduce the usage of features in compiletest and libtest
oli-obk 3aaa809
Rollup merge of #42926 - Havvy:doc-path-ext, r=steveklabnik
steveklabnik 8dc69ff
Rollup merge of #43125 - aochagavia:stable_drop, r=arielb1
steveklabnik ddf43b5
Rollup merge of #43157 - zackmdavis:mail_map, r=steveklabnik
steveklabnik 591d8a1
Rollup merge of #43167 - SimonSapin:alt-profiler, r=alexcrichton
steveklabnik a14b30c
Rollup merge of #43187 - steveklabnik:code-of-conduct, r=alexcrichton
steveklabnik 9d4b462
Rollup merge of #43203 - jackpot51:patch-2, r=alexcrichton
steveklabnik da3f5b8
Rollup merge of #43204 - jackpot51:patch-3, r=alexcrichton
steveklabnik bdcebc9
Update the `cargo` submodule
alexcrichton 3bf8116
Split old and experimental wasm builders
tlively 03f22fd
windows::fs::symlink_dir: fix example to actually use symlink_dir
RalfJung b90e510
Forward more Iterator methods for str::Bytes
SimonSapin 2007987
Forward more Iterator methods for iter::Rev
SimonSapin b5c5a0c
Fix regression involving identifiers in `macro_rules!` patterns.
jseyfried ab91c70
Auto merge of #43216 - steveklabnik:rollup, r=steveklabnik
bors 1da51cc
Fix minor typo in std::path documentation.
kennytm 5757e05
Fix backtrace on Redox
jackpot51 20f77c6
Auto merge of #43026 - arielb1:llvm-next, r=alexcrichton
bors ae4803a
Auto merge of #43175 - tlively:wasm-split-bots, r=alexcrichton
bors e760ba2
Update the books.
steveklabnik 30ad625
add u128/i128 to sum/product implementors
zackmdavis 6d9d82d
Auto merge of #43180 - oli-obk:compiletest, r=alexcrichton
bors 0af5c00
Add support for dylibs with Address Sanitizer. This supports cdylibs …
Firstyear 23ecebd
Auto merge of #43174 - RalfJung:refactor-ty, r=nikomatsakis
bors b4502f7
Auto merge of #43184 - nikomatsakis:incr-comp-anonymize-trait-selecti…
bors e7a9f1b
Rollup merge of #43074 - SimonSapin:iter, r=aturon
frewsxcv c3a8347
Rollup merge of #43145 - GuillaumeGomez:build-error-if-nothing, r=Mar…
frewsxcv 721f736
Rollup merge of #43159 - cuviper:ptr-swap-simd, r=arielb1
frewsxcv 351c476
Rollup merge of #43202 - jackpot51:patch-1, r=sfackler
frewsxcv 877e62e
Rollup merge of #43222 - RalfJung:symlink, r=sfackler
frewsxcv 57bc82d
Rollup merge of #43228 - redox-os:backtrace_fix, r=alexcrichton
frewsxcv 09b3ea7
Rollup merge of #43229 - kennytm:return-false-if-path-is-relative-hah…
frewsxcv e3825ec
Rollup merge of #43240 - steveklabnik:update-books, r=QuietMisdreavus
frewsxcv 8658908
Auto merge of #43185 - durka:thread-local-pub-restricted, r=alexcrichton
bors 70cd955
Auto merge of #43179 - oli-obk:mark_all_the_expansions, r=jseyfried
bors c4373bd
Auto merge of #43207 - alexcrichton:update-cargo, r=nikomatsakis
bors db19bf0
Document default values for primitive types
vbrandl a783fe2
Auto merge of #43246 - frewsxcv:rollup, r=frewsxcv
bors caf125f
Rephrase the doc string
vbrandl 086eaa7
Auto merge of #43224 - jseyfried:fix_macro_idents_regression, r=nrc
bors 5f37110
Compile `compiler_builtins` with `abort` panic strategy
petrochenkov be18613
Auto merge of #43252 - vbrandl:doc/default-values, r=GuillaumeGomez
bors 8f1339a
Auto merge of #43237 - zackmdavis:missing_sum_and_product_for_128_bit…
bors b115968
Fix `range_covered_by_constructor` for exclusive ranges.
feadoor 1b3c339
Update function name to reflect reality
feadoor 56071f6
Auto merge of #43055 - est31:stabilize_float_bits_conv, r=sfackler
bors 08652ec
Auto merge of #43258 - petrochenkov:cbabort, r=alexcrichton
bors 2579793
Remove exception from license check for strings.rs
nrc 04415dc
Run RLS tests
nrc 88cf76a
Auto merge of #42146 - nrc:rls-rust, r=alexcrichton
bors 4a28663
Move some tests from compile-fail to ui
oli-obk a9d9a4a
Change some helps to suggestions
oli-obk eb7f429
Move resolve diagnostic instability to compile-fail
oli-obk 5803f99
Auto merge of #42033 - oli-obk:suggestions, r=petrochenkov
bors 028569a
Auto merge of #43266 - feadoor:issue-43253-exclusive-range-warning, r…
bors 2652ce6
Auto merge of #42711 - Firstyear:san-on-dylib, r=alexcrichton
bors 5580c19
write log of queries
9967e9e
Support generic lifetime arguments in method calls
petrochenkov 7ca378b
Prohibit lifetime arguments in path segments with late bound lifetime…
petrochenkov e40cedb
Detect implicitly defined late bound lifetime parameters as well
petrochenkov 46f427b
Fix incorrect subst index
petrochenkov 36be634
rustc waits for profile-queries dump to complete
9153bb3
add minimal doc
f9fabc1
tidy
39114f9
Make `late_bound_lifetime_arguments` lint warn-by-default
petrochenkov c843661
travis: Make a few `curl` invocations more resilient
alexcrichton 2e63340
Auto merge of #43293 - alexcrichton:fail-curl, r=Mark-Simulacrum
bors 83c659e
Auto merge of #42492 - petrochenkov:methlife, r=nikomatsakis
bors d245dc4
add '-Z profile-queries' debug flag
081ab8e
tidy
e56a8a8
rebase
74a7234
fix nits from Niko
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,8 @@ use ty::{self, CrateInherentImpls, Ty, TyCtxt}; | |
use ty::item_path; | ||
use ty::steal::Steal; | ||
use ty::subst::Substs; | ||
|
||
use util::common::{profq_msg,ProfileQueriesMsg}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: |
||
use util::nodemap::{DefIdSet, NodeSet}; | ||
|
||
use rustc_data_structures::indexed_vec::IndexVec; | ||
|
@@ -391,6 +393,15 @@ impl<'tcx> QueryDescription for queries::is_mir_available<'tcx> { | |
} | ||
} | ||
|
||
// If enabled, send a message to the profile-queries thread | ||
macro_rules! profq_msg { | ||
($tcx:expr, $msg:expr) => { | ||
if $tcx.sess.opts.debugging_opts.profile_queries { | ||
profq_msg($msg) | ||
} | ||
} | ||
} | ||
|
||
macro_rules! define_maps { | ||
(<$tcx:tt> | ||
$($(#[$attr:meta])* | ||
|
@@ -418,6 +429,12 @@ macro_rules! define_maps { | |
$($(#[$attr])* $name($K)),* | ||
} | ||
|
||
#[allow(bad_style)] | ||
#[derive(Clone, Debug, PartialEq, Eq)] | ||
pub enum QueryMsg { | ||
$($name(String)),* | ||
} | ||
|
||
impl<$tcx> Query<$tcx> { | ||
pub fn describe(&self, tcx: TyCtxt) -> String { | ||
match *self { | ||
|
@@ -459,9 +476,16 @@ macro_rules! define_maps { | |
key, | ||
span); | ||
|
||
profq_msg!(tcx, | ||
ProfileQueriesMsg::QueryBegin(span.clone(), | ||
QueryMsg::$name(format!("{:?}", key)))); | ||
|
||
if let Some(result) = tcx.maps.$name.borrow().get(&key) { | ||
profq_msg!(tcx, ProfileQueriesMsg::CacheHit); | ||
return Ok(f(result)); | ||
} | ||
// else, we are going to run the provider: | ||
profq_msg!(tcx, ProfileQueriesMsg::ProviderBegin); | ||
|
||
// FIXME(eddyb) Get more valid Span's on queries. | ||
// def_span guard is necesary to prevent a recursive loop, | ||
|
@@ -476,6 +500,7 @@ macro_rules! define_maps { | |
let provider = tcx.maps.providers[key.map_crate()].$name; | ||
provider(tcx.global_tcx(), key) | ||
})?; | ||
profq_msg!(tcx, ProfileQueriesMsg::ProviderEnd); | ||
|
||
Ok(f(tcx.maps.$name.borrow_mut().entry(key).or_insert(result))) | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
use rustc::util::common::{ProfileQueriesMsg,profq_set_chan}; | ||
use std::sync::mpsc::{Receiver}; | ||
use std::io::{Write}; | ||
|
||
pub mod trace; | ||
|
||
pub fn begin() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe leave a comment like: "starts thread if not already running" |
||
use std::thread; | ||
use std::sync::mpsc::{channel}; | ||
let (tx, rx) = channel(); | ||
if profq_set_chan(tx) { | ||
thread::spawn(move||profile_queries_thread(rx)); | ||
} | ||
} | ||
|
||
fn profile_queries_thread(r:Receiver<ProfileQueriesMsg>) { | ||
use self::trace::*; | ||
use std::fs::File; | ||
use std::time::{Instant}; | ||
|
||
let mut queries : Vec<ProfileQueriesMsg> = vec![]; | ||
let mut frame : StackFrame = StackFrame{ parse_st:ParseState::NoQuery, traces:vec![] }; | ||
let mut stack : Vec<StackFrame> = vec![]; | ||
loop { | ||
let msg = r.recv(); | ||
if let Err(_recv_err) = msg { | ||
// FIXME: Perhaps do something smarter than simply quitting? | ||
break | ||
}; | ||
let msg = msg.unwrap(); | ||
debug!("profile_queries_thread: {:?}", msg); | ||
|
||
// Meta-level versus _actual_ queries messages | ||
match msg { | ||
ProfileQueriesMsg::Halt => return, | ||
ProfileQueriesMsg::Dump(path) => { | ||
assert!(stack.len() == 0); | ||
assert!(frame.parse_st == trace::ParseState::NoQuery); | ||
{ // write HTML file | ||
let html_path = format!("{}.html", path); | ||
let mut html_file = File::create(&html_path).unwrap(); | ||
|
||
let counts_path = format!("{}.counts.txt", path); | ||
let mut counts_file = File::create(&counts_path).unwrap(); | ||
|
||
write!(html_file, "<html>\n").unwrap(); | ||
write!(html_file, | ||
"<head>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"{}\">\n", | ||
"profile_queries.css").unwrap(); | ||
write!(html_file, "<style>\n").unwrap(); | ||
trace::write_style(&mut html_file); | ||
write!(html_file, "</style>\n").unwrap(); | ||
write!(html_file, "</head>\n").unwrap(); | ||
write!(html_file, "<body>\n").unwrap(); | ||
trace::write_traces(&mut html_file, &mut counts_file, &frame.traces); | ||
write!(html_file, "</body>\n</html>\n").unwrap(); | ||
} | ||
continue | ||
} | ||
// Actual query message: | ||
msg => { | ||
queries.push(msg.clone()); | ||
match (frame.parse_st.clone(), msg) { | ||
(_,ProfileQueriesMsg::Halt) => unreachable!(), | ||
(_,ProfileQueriesMsg::Dump(_)) => unreachable!(), | ||
|
||
// Parse State: NoQuery | ||
(ParseState::NoQuery, | ||
ProfileQueriesMsg::QueryBegin(span,querymsg)) => { | ||
let start = Instant::now(); | ||
frame.parse_st = ParseState::HaveQuery | ||
(Query{span:span, msg:querymsg}, start) | ||
}, | ||
(ParseState::NoQuery, | ||
ProfileQueriesMsg::CacheHit) => { | ||
panic!("parse error: unexpected CacheHit; expected QueryBegin") | ||
}, | ||
(ParseState::NoQuery, | ||
ProfileQueriesMsg::ProviderBegin) => { | ||
panic!("parse error: expected QueryBegin before beginning a provider") | ||
}, | ||
(ParseState::NoQuery, | ||
ProfileQueriesMsg::ProviderEnd) => { | ||
let provider_extent = frame.traces; | ||
match stack.pop() { | ||
None => | ||
panic!("parse error: expected a stack frame; found an empty stack"), | ||
Some(old_frame) => { | ||
match old_frame.parse_st { | ||
ParseState::NoQuery => | ||
panic!("parse error: expected a stack frame for a query"), | ||
ParseState::HaveQuery(q,start) => { | ||
let duration = start.elapsed(); | ||
frame = StackFrame{ | ||
parse_st:ParseState::NoQuery, | ||
traces:old_frame.traces | ||
}; | ||
let trace = Rec { | ||
effect: Effect::QueryBegin(q, CacheCase::Miss), | ||
extent: Box::new(provider_extent), | ||
start: start, | ||
duration: duration, | ||
}; | ||
frame.traces.push( trace ); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
// Parse State: HaveQuery | ||
(ParseState::HaveQuery(q,start), | ||
ProfileQueriesMsg::CacheHit) => { | ||
let duration = start.elapsed(); | ||
let trace : Rec = Rec{ | ||
effect: Effect::QueryBegin(q, CacheCase::Hit), | ||
extent: Box::new(vec![]), | ||
start: start, | ||
duration: duration, | ||
}; | ||
frame.traces.push( trace ); | ||
frame.parse_st = ParseState::NoQuery; | ||
}, | ||
(ParseState::HaveQuery(_,_), | ||
ProfileQueriesMsg::ProviderBegin) => { | ||
stack.push(frame); | ||
frame = StackFrame{parse_st:ParseState::NoQuery, traces:vec![]}; | ||
}, | ||
(ParseState::HaveQuery(q,_), | ||
ProfileQueriesMsg::ProviderEnd) => { | ||
panic!("parse error: unexpected ProviderEnd; | ||
expected something else to follow BeginQuery for {:?}", q) | ||
}, | ||
(ParseState::HaveQuery(q1,_), | ||
ProfileQueriesMsg::QueryBegin(span2,querymsg2)) => { | ||
panic!("parse error: unexpected QueryBegin; | ||
earlier query is unfinished: {:?} and now {:?}", | ||
q1, Query{span:span2, msg:querymsg2}) | ||
}, | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment?