coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "jonikelee AT gmail.com" <jonikelee AT gmail.com>
- To: Jason Gross <jasongross9 AT gmail.com>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] what does "0 calls" imply in Ltac profile output?
- Date: Sat, 25 Jul 2020 21:36:27 -0400
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jonikelee AT gmail.com; spf=Pass smtp.mailfrom=jonikelee AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk1-f171.google.com
- Ironport-phdr: 9a23:8YMxThALFVCetvfogUq6UyQJP3N1i/DPJgcQr6AfoPdwSPX+osbcNUDSrc9gkEXOFd2Cra4d1ayL7eu8AiQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagYL5+NhW7oATeusQZj4ZpN7o8xAbOrnZUYepd2HlmJUiUnxby58ew+IBs/iFNsP8/9MBOTLv3cb0gQbNXEDopPWY15Nb2tRbYVguA+mEcUmQNnRVWBQXO8Qz3UY3wsiv+sep9xTWaMMjrRr06RTiu86FmQwLzhSwZKzA27n3Yis1ojKJavh2hoQB/w5XJa42RLfZyY7/Rcc8fSWdHQ81fVTFOApmkYoUBD+QPI/tWoYr/qFsAqhWxChWjCuz0xz9Un3/7x7E23v49HQzE2gErAtIAsG7TrNXwLKoeX+K1zK7OzTXCbPNZxzP955bWfR06rvGMWKh/ccvVyUU1CwzFiVCQpYL4ND6S1OQNtG6b7+tjVe2xj24otR9+ryOgxscpkIbJh4YVxkrY+iV+xYY4PNu1Q1N0btC4CpVfrT2aN5doTcM4RWFloDo3xqMEtJO0YiUHypUqyRDfZfGbc4WF5gzuWeePLDplhH9pZK+zihes/UW+1+DxSMa53EpUoyRLjtTBtXQA2hzV58OaSfV95l+s1SiT2w3X8O1JIkA5mbDFJ5I/3LI8jIcfvEbeEiPuhkn7jbOaelgh9+S17+nofrDrq5CdOoNolg3zN6ojldKwDOk9MQUBQnWX9OGi27Ds8035TrBHjvMonaXHsZ3XINgUq6+3DgJX1Iso9gyxAC280NsCmHkKNFJFdwyDj4juI1zOJer3Dfa7g1i1iTdrxO3KMqTvApnQLHXPja3tfbl6605bxwozyc5Q64hIBbEGJfL/Qk7xtNrGAR8lKwG43frrBdFn2o4dWW+DGLGVPL3MvVOS++4iIfSAaJcQuDnnKvgl4/DujWU+mV8YZaSp35wXaHa5HvRlPUqZZWTjjckaHGcFuwoxVu3qiFmYXTFPYHayWrow5isnB4K+EYfDWoetjaSd0ye8B51af3xJClSREXjzbIiEQPcNaCeKIsB7iDAEVL6hS5Ug1R60rgP6xaBnfaLo/Xg6vInk0pBa/erIjllm9zVvCMKSyWaWVDBckWYBRjtw16d69x9T0FCGhOJ6hPpZFtFX6v5hXQIzNJqaxOt/QZimWAXHf9SETFuratqjCDA1CNk2xoldMA5GB9y+g0WbjGKRCLgPmunOXcRsq/+O7z3KP894jk3++uwhgl0hGJUdMGSngutm9FGWCdeWygOWkKGlcala1ynIpj/anDi++XpAWQs1ap3rGHUWZ0/Yt9P8vxqQQLqnCLBhOQxEm5fbdvl6L+bxhFADf8/NfczEajvoyWi1DBeMgLiLadiydg==
The 'use_node' tactic is a tactic expression (no ';' sequence), so I can
understand why (but did not anticipate that) its count would be 0
according to the info you provided. But it is still counted with
respect to local and total timing, according to the output. If as a
tactic expression it is evaluated and not counted, why then isn't its
evaulated form counted directly by its parent tactics in the call chain?
Regardless, I will stick an "idtac;" at the start of each 0-counted
tactic that I want correct call counts for (which is all of them).
On Sat, 25 Jul 2020 20:34:21 -0400
Jason Gross <jasongross9 AT gmail.com> wrote:
> What's the definition of `use_node`? Note that the profiler does not
> count calls to tactics which are run during tactic expression
> evaluation, only during tactic running time. Consider, for example:
> Ltac foo _ := idtac.
> Ltac bar := let __ := match goal with _ => foo () end in
> idtac.
> Ltac baz := bar.
> Ltac qux := idtac; baz.
>
> Goal True.
> Set Ltac Profiling.
> qux.
> Show Ltac Profile CutOff 0.
> (* total time: 0.000s
>
> tactic local total calls
> max
> ────────────────────────────────────────┴──────┴──────┴───────┴─────────┘
> ─qux ----------------------------------- 32.8% 100.0% 1
> 0.000s ─baz ----------------------------------- 12.1% 65.5% 0
> 0.000s ─bar ----------------------------------- 50.0% 55.2%
> 1 0.000s ─foo ----------------------------------- 5.2% 5.2%
> 0 0.000s
>
> tactic local total calls
> max
> ────────────────────────────────────────┴──────┴──────┴───────┴─────────┘
> ─qux ----------------------------------- 32.8% 100.0% 1
> 0.000s ├─baz --------------------------------- 12.1% 65.5% 0
> 0.000s │└bar --------------------------------- 48.3% 53.4%
> 0 0.000s │└foo --------------------------------- 5.2% 5.2%
> 0 0.000s └─bar --------------------------------- 1.7% 1.7%
> 1 0.000s
>
> *)
>
> The way to interpret this is that, during tactic expression evaluation
> phase, baz calls bar which calls foo, and none of these are counted as
> calls (if they were, we'd end up double-counting almost all tactics).
> After tactic expression evaluation phase, the remaining tactic to run
> is "idtac" under "bar", so we get "bar" as a direct descendent of
> "qux" with one call.
>
> On Sat, Jul 25, 2020 at 2:46 PM jonikelee AT gmail.com
> <jonikelee AT gmail.com> wrote:
>
> > I am perhaps not interpreting Ltac Profiling output correctly, but
> > having 0 for calls below seems like it must be a bug, since either
> > use_node must have been called at least once, or it must have calls
> > within it to have a very different local vs. total percentage:
> >
> > tactic local total calls
> > max
> > ────────────────────────────────────────┴──────┴──────┴───────┴─────────┘
> > ─tac ----------------------------------- 0.6% 82.2% 41833
> > 11.316s ─force refine (uconstr) by (tactic1) --- 0.0% 57.5%
> > 148 11.332s ─use_node ------------------------------ 0.0%
> > 56.4% 0 23.650s ...
> >
> > Is this a bug? If not, what is the proper interpreation of the
> > calls column? Or, for that matter, all columns?
> >
> > My probably incorrect interpretation is that "local" refers to the
> > particular tactic excluding any others it calls, while "total"
> > includes others it calls. And calls is the total number of times it
> > runs. And max is the maximal amount of time of any single call,
> > including sub calls. This makes sense except for calls = 0 cases,
> > of which I have several. My alternate interpretation of calls
> > would be that it is the total number of calls the tactic makes
> > (subcalls), but that cannot be 0 unless that tactic's local and
> > total are the same (or very close). I'm also assuming that the top
> > "tac" line is the total for all tactics.
> >
> > Note that the refman is silent about the interpretation of the
> > output, but its examples do show cases where calls=0. And in those
> > cases local and total are very close (so perhaps my alternate
> > interpretation of calls is correct, and the total-local difference
> > is just the Ltac call overhead of the tactic itself?).
> >
> > BTW: this is in the tagged 8.12 build as of yesterday, where
> > supposedly the longstanding Ltac Profiling shortcoming vs.
> > multi-success backtracking tactics has been fixed. I had previously
> > not paid close attention to anomalies in the Ltac Profiling output
> > because of that shortcoming.
> >
> > Thanks,
> > Jonathan
> >
- [Coq-Club] what does "0 calls" imply in Ltac profile output?, jonikelee AT gmail.com, 07/25/2020
- Re: [Coq-Club] what does "0 calls" imply in Ltac profile output?, Jason Gross, 07/26/2020
- Re: [Coq-Club] what does "0 calls" imply in Ltac profile output?, jonikelee AT gmail.com, 07/26/2020
- Re: [Coq-Club] what does "0 calls" imply in Ltac profile output?, Jason Gross, 07/26/2020
- Re: [Coq-Club] what does "0 calls" imply in Ltac profile output?, jonikelee AT gmail.com, 07/26/2020
- Re: [Coq-Club] what does "0 calls" imply in Ltac profile output?, Jason Gross, 07/26/2020
- Re: [Coq-Club] what does "0 calls" imply in Ltac profile output?, jonikelee AT gmail.com, 07/26/2020
- Re: [Coq-Club] what does "0 calls" imply in Ltac profile output?, Jason Gross, 07/26/2020
Archive powered by MHonArc 2.6.19+.