freenode/#clasp - IRC Chatlog
Search
16:34:41
Bike
drmeister: did we have some profiling thing to get self-times from traces? countt tips or something?
17:42:49
kpoeck
I will be glad to invite drmeister to his first Bitter Kas (or any other local drink)
18:52:53
drmeister
The travis-ci folks have upped clasp's build time to 180min and that is their limit. If that doesn't do it for us they say they have some other tricks.
18:53:35
drmeister
I don't have anything for self timing - we would have to write something to pull that out of the backtraces.
18:54:12
drmeister
You want to time how much time is spent in each function, subtracting the time spent in functions it calls - right? That's the self time.
19:28:10
drmeister
There's a lot of niggling little details that need to be right about these calculations.
19:36:51
Bike
stupid static constructors thing is still slow because stupid multiple value bind conses and it overwhels the time of actually allocating the stupid object
19:38:28
Bike
because it expands into (multiple-value-call (lambda ...) ...) and the closure has to be allocated
19:38:52
Bike
it should be inlined, and hir inlining is a good step for that, except the hir doesn't have enough information to actually determine it can be inlined
19:44:11
drmeister
I'm asking because multiple-value-bind consing has been a sore spot for a long time.
19:46:54
Bike
i'm really not sure. it's not something that fits very well into how cleavir works presently
19:49:50
Bike
also looking at the flame graph i can see a C++ wrapper spending at least 5% of its time in dynamic_cast. probably not an issue here but that still gets me antsy
19:59:21
Bike
there's also a comment in instance.h saying it always uses dynamic_cast, for isA i guess
20:04:29
drmeister
That will take backtraces N times a second and count what percentage of backtraces contain every function for each function.
20:05:17
drmeister
If clasp is spending a lot of time in a function, either self time or because it's on the stack - it will show up with a large percentage.
20:06:32
drmeister
You run 'do-dtrace' --> /tmp/out-<pid>.user_stacks and then ./count-calls -i /tmp/out-<pid>.user_stacks -o /tmp/out-report.txt
20:07:27
drmeister
It only counts the function once for each backtrace that it appears in. So recursive calls that are on a backtrace multiple times only count for one.
20:20:14
drmeister
Could you shut down your notebook and come by my office? I'll rearrange things and show you what I mean.
21:44:09
drmeister
I'm getting pretty fed up with travis. They've increased the time clasp can use to 180 min - the build crashed at 2h30m and I can't see the log.
2:01:27
Bike
having the things depend on the environment also sucks, but i guess that's just what make-instance does
2:32:11
Bike
but in order to keep up with changes to classes and methods and stuff, it has to do a bunch of weird things
2:32:23
Bike
and if it's (make-instance 'foo ...), that has to work properly after (setf (find-class 'foo) ...)
2:34:26
drmeister
Do you have it figured out then? It sounds like a hard problem to handle changing the class.
2:35:36
Bike
obviously doable for clasp, but i was originally writing this thing to be as implementation independent as i could mmanage
2:37:08
Bike
a standard make instance is car, a couple funcalls, core:allocate-new-instance, a couple si:instance-set
2:39:01
drmeister
I'm not telling you to change what you are doing but here's a crazy idea. What if you compiled (make-instance 'foo ...) to (if (= (instance-stamp (find-class 'foo)) <somestamp>) (fast-make-instance-foo ...) (make-instance 'foo ...)) ?
2:40:35
drmeister
Yeah - my idea would drop back to the slow code from then on. More clever things would make the fast path reconfigurable - like compiling a new fast-make-instance-foo.
2:41:41
Bike
the part that really makes it different from fastgf is that the body depends not just on the class, but on the keyword arguments