massung
2022-6-30 12:42:52

that’s really cool @soegaard2


spdegabrielle
2022-6-30 12:44:56

I took it as a joke, and responded jokingly (I hope).


spdegabrielle
2022-6-30 12:56:58

Are there any ‘Developer Evangelist’ on the plane? or does anyone know one who might be up for providing a little advice? (Basically I’d like to take up a half hour of the time of someone who knows what they are doing to see if there is anything we can do better)


pavpanchekha
2022-6-30 21:55:24

What causes ??? records in profiles? When do we have stack frames without corresponding stack locations?


pavpanchekha
2022-6-30 23:52:08

If I have a named let , but it does not actually call itself recursively, does it create a stack frame on its first execution?


pavpanchekha
2022-6-30 23:52:55

Basically, I have an imperative function with three phases. I want all three to appear separately in profiling results. Of course I can do that by defining three different functions, but that would be kind-of inconvenient.


pavpanchekha
2022-7-1 00:07:34

I’m now pretty convinced that these are for loops. It would be really swell to get at least source locations on these, and ideally label them something like for or even (for (,args) …) so I can identify which for loop it is.


pavpanchekha
2022-7-1 00:08:13

But even just source locations would be swell, because it would mean that each for loop has its own profile entry. Whereas right now there’s a profile entry for “all for loops”, which naturally is not super helpful.


samth
2022-7-1 00:18:11

I think ??? will only happen if the relevant function has no name or source location at all, which is unlikely to be the case for a normal let loop or for


samth
2022-7-1 00:20:16

A named let certainly involves a function call even if there’s no recursive call


samth
2022-7-1 00:23:02

Whether there’s a stack frame is a more complicated question that can depend on inlining or tail calls


pavpanchekha
2022-7-1 00:23:54

Hmm. let loop definitely produces names, but for loops do not for me. It might be my profile->json code, I’ll double-check…


samth
2022-7-1 00:24:22

The “name” is probably just a source location


pavpanchekha
2022-7-1 00:24:53

Hmm. Is there a way to disable inlining? I already understand the tail call issue. It is going to mess up my profiles but I can account for that.


samth
2022-7-1 00:26:26

There is an environment variable and a flag to raco make


samth
2022-7-1 00:28:24

You can see some raw info by calling continuation-mark-set->context inside the function and printing that


pavpanchekha
2022-7-1 00:30:02

Ah. Is there a way to disable inlining for a specific function? Or can I force a new stack frame into existence by calling call-with-immediate-continuation-mark?


samth
2022-7-1 00:31:11

You can’t explicitly disable inlining for a function, but if you mutate the function (eg (set! f f)) then it won’t inline


pavpanchekha
2022-7-1 00:31:34

love it, love it, thank you Sam.


samth
2022-7-1 00:33:37

Someone should figure out a good debuginfo story for this sometime