We describe a profile-driven compiler optimization technique for inter-proc
ess optimization, which dynamically inlines the effects of sending messages
. Profiling is used to find optimization opportunities, and to dynamically
trigger recompilation and optimization at run-time. We apply the optimizati
on technique on the concurrent programming language ERLANG, letting recompi
lation take place in a separate ERLANG process, and taking advantage of the
facilities provided by ERLANG to dynamically replace code at run-time. We
have implemented a prototype inter-process profiler and optimizer, that can
handle small programs. Measurements on synthetic benchmarks show encouragi
ng speedups of up to 1.8 times.