Instrumentation based Profiling

Hello all,

I’m wondering as to the status of control flow profiling in llvm. From what I can gather there was an old system (using opt -insert-edge-profiling and the like) which was removed in this commit llvm.org/viewvc/llvm-project?view=revision&revision=191835 . The commit message mentions “modern PGO efforts”, but I can’t find anything in the source tree or documentation. Who is working on the newer efforts and what is their status? If there’s work that still needs to be done, I’d be happy to help out in a serious way.

Thanks,

Jeremy Salwen

Jeremy Salwen <jeremysalwen@gmail.com> writes:

I'm wondering as to the status of control flow profiling in llvm. From what I
can gather there was an old system (using opt -insert-edge-profiling and the
like) which was removed in this commit llvm.org/viewvc/llvm-project?view=
revision&revision=191835 . The commit message mentions "modern PGO efforts",
but I can't find anything in the source tree or documentation. Who is working
on the newer efforts and what is their status? If there's work that still
needs to be done, I'd be happy to help out in a serious way.

The mention of "modern PGO efforts" is about two things:

- Sampling profilers, as documented in
  http://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers-for-optimization

- Frontend instrumentation profiling. This really isn't documented at
  all yet, but it consists of the -fprofile-instr-generate and
  -fprofile-instr-use flags, and the llvm-profdata tool. I'll add some
  notes to the user guide this week - sorry that I haven't gotten to it
  sooner.

Hi Justin,

I’ve been searching the mailing list and the web for discussion of the frontend instrumentation profiling. Is there some sort of a design document or thread where it was discussed? I’m curious why it was implemented in the frontend instead of a pass on the IR.

Thanks,

Jeremy

Jeremy Salwen <jeremysalwen@gmail.com> writes:

I've been searching the mailing list and the web for discussion of the
frontend instrumentation profiling. Is there some sort of a design document
or thread where it was discussed? I'm curious why it was implemented in the
frontend instead of a pass on the IR.

Bob Wilson talked about the motivation for this approach at the 2013 dev
meeting. He's the first speaker in the video here:

    http://llvm.org/devmtg/2013-11/#talk14

and the thread from the original proposal last September:

    http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-September/031825.html

A few things have changed since then, but hopefully those are helpful.