History log of /external/llvm/include/llvm/Support/Process.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd81d94322a39503e4a3e87b6ee03d4fcb3465fb 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/include/llvm/Support/Process.h
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/include/llvm/Support/Process.h
6a971bb8f59f4e20c953a2cc360cab7bae8642e4 07-Oct-2013 David Majnemer <david.majnemer@gmail.com> Revert "Revert "Windows: Add support for unicode command lines""

This reverts commit r192070 which reverted r192069, I forgot to
regenerate the configure scripts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
b262556c45bb7b3add826bc3f050c99db6990c37 06-Oct-2013 David Majnemer <david.majnemer@gmail.com> Revert "Windows: Add support for unicode command lines"

This is causing MinGW bots to fail.
This reverts commit r192069.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
5a1a1856a4dfa1335d937437fade5c0bbab06560 06-Oct-2013 David Majnemer <david.majnemer@gmail.com> Windows: Add support for unicode command lines

Summary:
The MSVCRT deliberately sends main() code-page specific characters.
This isn't too useful to LLVM as we end up converting the arguments to
UTF-16 and subsequently attempt to use the result as, for example, a
file name. Instead, we need to have the ability to access the Unicode
command line and transform it to UTF-8.

This has the distinct advantage over using the MSVC-specific wmain()
function as our entry point because:
- It doesn't work on cygwin.
- It only work on MinGW with caveats and only then on certain versions.
- We get to keep our entry point as main(). :)

N.B. This patch includes fixes to other parts of lib/Support/Windows
s.t. we would be able to take advantage of getting the Unicode paths.
E.G. clang spawning clang -cc1 would want to give it Unicode arguments.

Reviewers: aaron.ballman, Bigcheese, rnk, ruiu

Reviewed By: rnk

CC: llvm-commits, ygao

Differential Revision: http://llvm-reviews.chandlerc.com/D1834

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
44a61bde15d456527156ee2080f0964344b939fe 11-Sep-2013 Nico Rieck <nico.rieck@gmail.com> Support ANSI escape code on Windows

In some cases (e.g. when a build system pipes stderr) the Windows console
API cannot be used to color output. For these, provide a way to switch to
ANSI escape codes. This is required for Clang's -fansi-escape-codes option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
f42d4247ae1138c6deed50f92dcd1a4f34e07dec 10-Sep-2013 Rui Ueyama <ruiu@google.com> Add getenv() wrapper that works on multibyte environment variable.

On Windows, character encoding of multibyte environment variable varies
depending on settings. The only reliable way to handle it I think is to use
GetEnvironmentVariableW().

GetEnvironmentVariableW() works on wchar_t string, which is on Windows UTF16
string. That's not ideal because we use UTF-8 as the internal encoding in LLVM.
This patch defines a wrapper function which takes and returns UTF-8 string for
GetEnvironmentVariableW().

The wrapper function does not do any conversion and just forwards the argument
to getenv() on Unix.

Differential Revision: http://llvm-reviews.chandlerc.com/D1612

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
0009850524f72183c49b506f3eb4c3bdc5f3a0d4 16-Aug-2013 Aaron Ballman <aaron@aaronballman.com> Removing unused functionality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
0c793018079803628b5aeee6bbc1e6464fbefd65 08-Jun-2013 Aaron Ballman <aaron@aaronballman.com> sys::process::get_id() now returns the process ID instead of a process handle on Windows. Patch thanks to Kim Gräsman!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
674be02d525d4e24bc6943ed9274958c580bcfbc 10-Jan-2013 Jakub Staszak <kubastaszak@gmail.com> Fix include guards so they exactly match file names.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
73c35d86b9d5236be5b3f49bc8df11008b96636e 05-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Add time getters to the process interface for requesting the elapsed
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
f5867ab7178784bc63a3deafcf4fb09260e4d19a 01-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Go ahead and get rid of the old page size interface and convert all the
users over to the new one. No sense maintaining this "compatibility"
layer it seems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
814afe91ccad0e5e1f767303d780fa0318fa5212 01-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Flesh out a page size accessor in the new API.

Implement the old API in terms of the new one. This simplifies the
implementation on Windows which can now re-use the self_process's once
initialization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
e0e1985b3b71f21cd1d6c1e4924abf0f5b499a73 31-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Remove an unused function in the old Process interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
0184a841d3914bb78c7c6fa87ce9da86a2d5992a 31-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Begin sketching out the process interface.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
dac1eeb4b7948456682e9aa641d2d5ef3eba8869 31-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Start sketching out a roadmap for better subprocess management in the
LLVM libraries. Also, clean up the doxygen and formatting of the
existing interfaces.

With this change I'm calling the existing interface "legacy" because I'd
like to replace it with something much better. My end goal is to expose
a common set of interfaces for inspecting various properties of
a process, and implementations to expose those both for the current
process and for child processes. This will also expose more rich
interfaces for spawning and controling a subprocess, notably to use
system calls like wait3 and wait4 where available and gather detailed
resource usage stats about the subprocess.

My plan (discussed with Michael Spencer on IRC) is to base this loosely
around the proposed Boost.Process interface, but to implement
a relatively small subset of that functionality based around the needs
of LLVM, Clang, the Clang driver, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
7d83658140cb99871a43a08715a45c84aa66f3cc 20-Jul-2012 Daniel Dunbar <daniel@zuster.org> Process: Add sys::Process::FileDescriptorHasColors().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160557 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
9c69e6ae698f44703725eec8ff27630b6b81f0e3 05-May-2012 Daniel Dunbar <daniel@zuster.org> [Support] Add sys::Process::GetRandomNumber().
- Primitive API, but we rarely have need for random numbers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
246de858e37a989a9cdf9b80d7434453b2c52e70 16-Apr-2012 Benjamin Kramer <benny.kra@googlemail.com> Reapply 'Add reverseColor to raw_ostream'.

To be used in printing unprintable source in clang diagnostics.
Patch by Seth Cantrell, with a minor fix for mingw by me.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
c9413c745bec9707064211bc5fd02cdfb153c92d 16-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r154800 which breaks windows builders.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
7d31d75a77bb7a5a47f21d4c311ba13be86caa6f 16-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add reverseColor to raw_ostream.

To be used in printing unprintable source in clang diagnostics.
Patch by Seth Cantrell!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
4aab4ab340863d87f9c566b69099ce60dd8762be 15-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Remove SetWorkingDirectory from the Process interface. Nothing in LLVM
or Clang is using this, and it would be hard to use it correctly given
the thread hostility of the function. Also, it never checked the return
which is rather dangerous with chdir. If someone was in fact using this,
please let me know, as well as what the usecase actually is so that
I can add it back and make it more correct and secure to use. (That
said, it's never going to be "safe" per-se, but we could at least
document the risks...)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
bb0a6126cf1372e3ba90f0f6ff16f7f4d0381105 24-Sep-2011 Daniel Dunbar <daniel@zuster.org> sys::Process: Add a SetWorkingDirectory method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
53ca1f3190680f3e86aebe0f72f7918d63f71e0d 29-Nov-2010 Charles Davis <cdavis@mines.edu> Now to chant the magical incantation that will exorcise the System library
from LLVM forever:

grep -lR "llvm/System" * | grep -v .svn | xargs sed -ie 's#llvm/System#llvm/Support#g'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h
1f6efa3996dd1929fbc129203ce5009b620e6969 29-Nov-2010 Michael J. Spencer <bigcheesegs@gmail.com> Merge System into Support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/Process.h