<napping>
That looks nice. Is there any way to prevent inlining?
<napping>
I was trying to check if a call graph can be reassembled if you can from a profiled module, into an unprofiled module, into another profiled module
<thelema>
-inline 0
<napping>
but ocamlopt seems to be too smart
<napping>
yeah, that's what I thought too, but it didn't work
<napping>
Bot.ml has functions like let f _ = print_string "f"; print_newline ()
<napping>
Mid.ml functions like let d x = print_string "d(";f x ; g x;print_string ")";print_newline ()
<napping>
and Top.ml is open Mid;; d (); e ()
<thelema>
"Specifying -inline 0 prevents all functions from being inlined, except those whose body is smaller than the call site."
<napping>
which shouldn't include any of those functions
ztfw has quit [Ping timeout: 250 seconds]
ymasory_ has joined #ocaml
ymasory has quit [Ping timeout: 248 seconds]
<hcarty>
thelema: A Camomile-less Batteries would be wonderful in my opinion
<thelema>
hcarty: Hopefully yoriyuki is amenable to having his ulib folded into batteries.
<hcarty>
thelema: Primarily because it would (I think?) remove any dependencies on outside files
<thelema>
yes, camomile is the only required library dependency of batteries.
<hcarty>
That too, but I was thinking about all of the resource files Camomile needs at run time
<thelema>
yes, I'll be happy to get rid of all that.
<napping>
Well, those functions are there after all, but the call graph is a bit strange
<napping>
I think some optimizations still occur inside modules
<thelema>
ocaml does cross-module inlining if it's useful.
<napping>
The first problem was that all the functions were buried in the profile because nothing took any time, and then I lost my functions next to all the runtime calls when I turned off filtering
<napping>
so then I made the leaf functions call somthing with an expensive loop
<napping>
but for some reason the time for that loop is attributed only to the mid-level functions, but doesn't appear within the leaf functions
<thelema>
napping: odd - maybe the leaf functions are still small enough to be inlined?
<napping>
let f _ = print_string "f"; print_newline (); delay ()
<napping>
doesn't seem like it should be inlined at -inline 0
<thelema>
you're probably right.
<thelema>
grr, I want one Batteries module with two implementations, but I can't because the .cmi files differ, because one implementation sets up locks using BatRMutex
* thelema
looks again at how Unix does it
Yoric has joined #ocaml
<thelema>
hmm, I wonder if the systhreads implementation of Mutex works in bytecode... I guess I can find out...
<napping>
objdump says Mid is just making simple calls to the functions in Bot
<napping>
I guess it's the tailcalls
<napping>
yeah, calBot__i_65 ends with a jmpq which the relocation info says goes to camlBot__delay_58
<napping>
so that time will show up under the parent, but not the leaf
<thelema>
TCO for the lose.
<ygrek>
gprof profiling is dead-end anyway
<thelema>
ygrek: why?
<ygrek>
recompilation needed, disturbs too much, requires full program run
<napping>
"Because there are already better replacements?", he asked, hopefully.
<napping>
I'm just following the suggestions in the docs here
<napping>
Hey, nice callgraph now, with print_newline() after the expensive thing
<ygrek>
poormansprofiler ftw
<napping>
hmm, looks pretty good
<thelema>
ygrek: wow, that's ghetto
<napping>
probably still won't handle tail calls very well
jld has quit [Ping timeout: 248 seconds]
<napping>
If modules are compiled without profiling on, the callgraph definitely gets broken
<napping>
_mcount just exracts the current function and it's caller by looking at the stack
ymasory_ is now known as ymasory
<napping>
and if that parent is in an untraced module it loses the trail
ftrvxmtrx has joined #ocaml
Tianon has quit [Read error: Operation timed out]
munga has quit [Ping timeout: 260 seconds]
Tianon has joined #ocaml
Tianon has quit [Ping timeout: 264 seconds]
Tianon has joined #ocaml
vivanov has quit [Ping timeout: 246 seconds]
Tianon has quit [Changing host]
Tianon has joined #ocaml
zorun has quit [Ping timeout: 248 seconds]
zorun has joined #ocaml
jld has joined #ocaml
jld has quit [Client Quit]
jld has joined #ocaml
chegibari has quit [Read error: Connection reset by peer]
nantralien has joined #ocaml
ymasory has quit [Quit: Leaving]
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
emmanuelux has quit [Remote host closed the connection]
waern has quit [Ping timeout: 240 seconds]
<hcarty>
thelema: What is the state of the v2 branch? Is it up to date with the development in master?
<thelema>
hcarty: no, I guess I should do one more merge from master
_andre has quit [Quit: leaving]
<thelema>
ok, now it's up to date with master
emmanuelux has joined #ocaml
Yoric has quit [Remote host closed the connection]
<hcarty>
thelema: It's probably not a big deal yet, but Camomile can be removed from README's list of requirements
<thelema>
yup.
<hcarty>
And META
<nantralien>
thelema i wonder why a standard set of libs is not in the stdlib of ocaml distib... :)
<hcarty>
And _oasis
<hcarty>
nantralien: The OCaml authors want to keep the bundled stdlib small to make it easier to maintain
<nantralien>
hcarty i know but my opinion about small is 'not so small' !
avsm has joined #ocaml
ikaros has joined #ocaml
<hcarty>
nantralien: That may be, but given how little full-time paid time OCaml gets, it's probably better that it stays small
<hcarty>
A community bundle can address stdlib limitations
<thelema>
hcarty: new v2 pushed
<nantralien>
hcarty yes it's a pity that all the good things that universities create, they let other develop it and get the money....
<thelema>
hmm, shouldn't have pushed...
<hcarty>
nantralien: I'm not sure I follow - a community OCaml bundle would, presumably, be distributed without charge
<nantralien>
hcarty i agree, i was speaking about general behaviour of universities
<hcarty>
nantralien: In an ideal case, the university would be focused on research rather than bringing in money
<nantralien>
hcarty i agree
<hcarty>
nantralien: The OCaml team does provide means to provide financial support for OCaml's development
<nantralien>
hcarty and i thank them for the wonderful compiler
<nantralien>
hcarty the best tool to use to focus on programming, and get efficient binaries :)
<hcarty>
It is quite a nice language and compiler
avsm has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
alfa_y_omega has quit [Ping timeout: 276 seconds]
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
alfa_y_omega has joined #ocaml
<thelema>
hcarty: new v2 pushed for testing
<hcarty>
thelema: Cool, I'll take a look. I'm sad to see that CamelCase won out :-)
<thelema>
it is slightly more efficient to type...
<hcarty>
But less efficient to read!
<thelema>
you'd rather Bat_multi_p_map?
<hcarty>
I'm not terribly concerned though... individual module names tend to be short
<hcarty>
No, but I like Multi_map more than MultiMap
<hcarty>
I wouldn't expect the Bat* modules to be used directly all that often, given that they are often incomplete
olauzon has quit [Quit: olauzon]
<thelema>
well, the stdlib gives us "ArrayLabels"/"StringLabels" and "Nativeint"/"Printexc"/"Bigarray" as well as "Big_int"/"Arith_status"
<hcarty>
Again, though - I'd argue that the *Labels modules are not going to be used directly all that often.
<hcarty>
They would probably be used as aliased replacements for the matching unlabeled module
olauzon has joined #ocaml
<hcarty>
Nativeint, Printexc, Bigarray are all unfortunately named, I agree :-)
<thelema>
the other reason I went for CamelCase was it was a simpler change. I agree with your logic, but just don't want to change things now. Send a patch, and it'll be as you name things.
<hcarty>
thelema: I understand - I'll either put a patch together soon or suck it up and deal with the consequences
<thelema>
exactly.
avsm1 has quit [Quit: Leaving.]
<hcarty>
preludeml has a short OCaml program which converts the prelude.ml source from CamelCase to underscore_separated. It may be usable with Batteries as well.
napping has quit [Quit: leaving]
edwin has quit [Remote host closed the connection]
munga has joined #ocaml
alfa_y_omega has quit [Ping timeout: 244 seconds]
alfa_y_omega has joined #ocaml
nantralien has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]