Skip to content
  1. Apr 05, 2013
  2. Mar 26, 2013
  3. Mar 14, 2013
  4. Feb 28, 2013
  5. Feb 20, 2013
  6. Feb 19, 2013
    • Alexey Samsonov's avatar
      Fix initialization-order bug in llvm::Support::TimeValue. TimeValue::now() is... · f940f0c4
      Alexey Samsonov authored
      Fix initialization-order bug in llvm::Support::TimeValue. TimeValue::now() is explicitly called during module initialization of lib/Support/Process.cpp. It reads the field of global object PosixZeroTime, which is not guaranteed to be initialized at this point. Found by AddressSanitizer with -fsanitize=init-order option.
      
      llvm-svn: 175509
      f940f0c4
  7. Feb 14, 2013
  8. Feb 04, 2013
    • Evgeniy Stepanov's avatar
      More MSan/ASan annotations. · 1f5a7149
      Evgeniy Stepanov authored
      This change lets us bootstrap LLVM/Clang under ASan and MSan. It contains
      fixes for 2 issues:
      
      - X86JIT reads return address from stack, which MSan does not know is
        initialized.
      - bugpoint tests run binaries with RLIMIT_AS. This does not work with certain
        Sanitizers.
      
      We are no longer including config.h in Compiler.h with this change.
      
      llvm-svn: 174306
      1f5a7149
  9. Jan 28, 2013
    • Edwin Vane's avatar
      Fix gcc/printf/ISO C++ warning · 44338e00
      Edwin Vane authored
      Remove the use of the 't' length modifier to avoid a gcc warning. Based
      on usage, 32 bits of precision is good enough for printing a stack
      offset for a stack trace.
      
      't' length modifier isn't in C++03 but it *is* in C++11. Added a FIXME
      to reintroduce once LLVM makes the switch to C++11.
      
      Reviewer: gribozavr
      llvm-svn: 173711
      44338e00
  10. Jan 10, 2013
  11. Jan 09, 2013
  12. Jan 05, 2013
    • Chandler Carruth's avatar
      Eric thought that Darwin was right to use -1 consistently rather than · b5429f43
      Chandler Carruth authored
      leaving this undefined, and despite the sentence in the standard that
      seems to require it, I'll cede the point and assume its a bug in the
      wording. Other parts of POSIX regularly allow for things to be -1
      instead of undefined, this should too. Makes things more consistent too.
      
      This should have to real impact for folks though.
      
      llvm-svn: 171574
      b5429f43
    • Chandler Carruth's avatar
      Try to suppress the use of clock_gettime on Darwin which apparantly · 2aaec89f
      Chandler Carruth authored
      defines _POSIX_CPUTIME but doesn't support the clock_* functions.
      
      I don't test the value of _POSIX_CPUTIME because the spec merely says
      that if it is defined, the CPU-specific timers are available, whereas it
      says that _POSIX_TIMERS must be defined and defined to a value greater
      than zero. However, this may not work, as the POSIX spec clearly states:
      
        "If the symbolic constant _POSIX_CPUTIME is defined, then the symbolic
        constant _POSIX_TIMERS shall also be defined by the implementation to
        have the value 200112L."
      
      If this doesn't work, I'll add more hacks for Darwin.
      
      llvm-svn: 171565
      2aaec89f
    • 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
  13. Jan 01, 2013
  14. Dec 31, 2012
    • Chandler Carruth's avatar
      Remove an unused function in the old Process interface. · b12634bf
      Chandler Carruth authored
      llvm-svn: 171327
      b12634bf
    • 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
      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
  15. Dec 04, 2012
  16. Dec 03, 2012
    • Chandler Carruth's avatar
      Use the new script to sort the includes of every file under lib. · ed0881b2
      Chandler Carruth authored
      Sooooo many of these had incorrect or strange main module includes.
      I have manually inspected all of these, and fixed the main module
      include to be the nearest plausible thing I could find. If you own or
      care about any of these source files, I encourage you to take some time
      and check that these edits were sensible. I can't have broken anything
      (I strictly added headers, and reordered them, never removed), but they
      may not be the headers you'd really like to identify as containing the
      API being implemented.
      
      Many forward declarations and missing includes were added to a header
      files to allow them to parse cleanly when included first. The main
      module rule does in fact have its merits. =]
      
      llvm-svn: 169131
      ed0881b2
  17. Nov 30, 2012
    • Chandler Carruth's avatar
      Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES. · f12e3a67
      Chandler Carruth authored
      Rationale:
      1) This was the name in the comment block. ;]
      2) It matches Clang's __has_feature naming convention.
      3) It matches other compiler-feature-test conventions.
      
      Sorry for the noise. =]
      
      I've also switch the comment block to use a \brief tag and not duplicate
      the name.
      
      llvm-svn: 168996
      f12e3a67
  18. Nov 15, 2012
    • Daniel Dunbar's avatar
      PathV2: Fix a possible infinite loop. · 61d59f29
      Daniel Dunbar authored
       - The code could infinite loop trying to create unique files, if the directory
         containing the unique file exists, but open() calls on non-existent files in
         the path return ENOENT. This is true on the /dev/fd filesystem, for example.
      
       - Will add a clang side test case for this.
      
      llvm-svn: 168081
      61d59f29
  19. Oct 17, 2012
  20. Sep 28, 2012
  21. Sep 26, 2012
  22. Sep 22, 2012
  23. Sep 19, 2012
  24. Sep 11, 2012
  25. Sep 06, 2012
  26. Aug 15, 2012
  27. Aug 10, 2012
Loading