Skip to content
  1. Jan 05, 2013
    • Chandler Carruth's avatar
      Add time getters to the process interface for requesting the elapsed · ef7f968e
      Chandler Carruth authored
      wall time, user time, and system time since a process started.
      
      For walltime, we currently use TimeValue's interface and a global
      initializer to compute a close approximation of total process runtime.
      
      For user time, this adds support for an somewhat more precise timing
      mechanism -- clock_gettime with the CLOCK_PROCESS_CPUTIME_ID clock
      selected.
      
      For system time, we have to do a full getrusage call to extract the
      system time from the OS. This is expensive but unavoidable.
      
      In passing, clean up the implementation of the old APIs and fix some
      latent bugs in the Windows code. This might have manifested on Windows
      ARM systems or other systems with strange 64-bit integer behavior.
      
      The old API for this both user time and system time simultaneously from
      a single getrusage call. While this results in fewer system calls, it
      also results in a lower precision user time and if only user time is
      desired, it introduces a higher overhead. It may be worthwhile to switch
      some of the pass timers to not track system time and directly track user
      and wall time. The old API also tracked walltime in a confusing way --
      it just set it to the current walltime rather than providing any measure
      of wall time since the process started the way buth user and system time
      are tracked. The new API is more consistent here.
      
      The plan is to eventually implement these methods for a *child* process
      by using the wait3(2) system call to populate an rusage struct
      representing the whole subprocess execution. That way, after waiting on
      a child process its stats will become accurate and cheap to query.
      
      llvm-svn: 171551
      ef7f968e
  2. Jan 02, 2013
  3. Jan 01, 2013
  4. Dec 31, 2012
    • Chandler Carruth's avatar
      Switch this code to a more idiomatic double using namespace directive. · 5473dfb0
      Chandler Carruth authored
      Fix a truly odd namespace qualifier that was flat out wrong in the
      process. The fully qualified namespace would have been
      llvm::sys::TimeValue, llvm::TimeValue makes no sense.
      
      llvm-svn: 171292
      5473dfb0
    • Chandler Carruth's avatar
      Delete a cut/paste-o from r171290. Very sorry about the noise. · 304de3c4
      Chandler Carruth authored
      llvm-svn: 171291
      304de3c4
    • Chandler Carruth's avatar
      5412246d
    • Chandler Carruth's avatar
      Begin sketching out the process interface. · 97683aa2
      Chandler Carruth authored
      The coding style used here is not LLVM's style because this is modeled
      after a Boost interface and thus done in the style of a candidate C++
      standard library interface. I'll probably end up proposing it as
      a standard C++ library if it proves to be reasonably portable and
      useful.
      
      This is just the most basic parts of the interface -- getting the
      process ID out of it. However, it helps sketch out some of the boiler
      plate such as the base class, derived class, shared code, and static
      factory function. It also introduces a unittest so that I can
      incrementally ensure this stuff works.
      
      However, I've not even compiled this code for Windows yet. I'll try to
      fix any Windows fallout from the bots, and if I can't fix it I'll revert
      and get someone on Windows to help out. There isn't a lot more that is
      mandatory, so soon I'll switch to just stubbing out the Windows side and
      get Michael Spencer to help with implementation as he can test it
      directly.
      
      llvm-svn: 171289
      97683aa2
  5. May 06, 2012
  6. May 05, 2012
  7. Nov 29, 2010
  8. May 06, 2008
  9. Dec 29, 2007
  10. Jul 26, 2006
    • Reid Spencer's avatar
      For PR780: · 082e2a78
      Reid Spencer authored
      Put the rest of lib/System into LinkAllVMCore.h. This makes all of
      lib/System available to programs that #include LinkALlVMCore.h so that
      loadable modules linked into those programs can depend on all of lib/System
      being available.
      
      llvm-svn: 29288
      082e2a78
  11. May 06, 2005
  12. Apr 22, 2005
  13. Jan 10, 2005
  14. Dec 27, 2004
    • Reid Spencer's avatar
      For PR351: · 97d4a17f
      Reid Spencer authored
      * Consolidate implementation for Unix systems into Unix/Process.cpp
      * Avoid use of symbolic link to #include platform-specific implementation.
      
      llvm-svn: 19150
      97d4a17f
  15. Sep 11, 2004
  16. Aug 29, 2004
  17. Aug 25, 2004
  18. Aug 16, 2004
  19. Aug 15, 2004
Loading