Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1296)

Unified Diff: runtime/vm/os_linux.cc

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/os_fuchsia.cc ('k') | runtime/vm/os_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_linux.cc
diff --git a/runtime/vm/os_linux.cc b/runtime/vm/os_linux.cc
index 7f5eff7eb2217004ea66d48c1e540654946dc1f0..163f436ea632aaeabb40a9ac43173aefaac27993 100644
--- a/runtime/vm/os_linux.cc
+++ b/runtime/vm/os_linux.cc
@@ -7,17 +7,17 @@
#include "vm/os.h"
-#include <errno.h> // NOLINT
-#include <limits.h> // NOLINT
-#include <malloc.h> // NOLINT
-#include <time.h> // NOLINT
+#include <errno.h> // NOLINT
+#include <limits.h> // NOLINT
+#include <malloc.h> // NOLINT
+#include <time.h> // NOLINT
#include <sys/resource.h> // NOLINT
-#include <sys/time.h> // NOLINT
-#include <sys/types.h> // NOLINT
-#include <sys/syscall.h> // NOLINT
-#include <sys/stat.h> // NOLINT
-#include <fcntl.h> // NOLINT
-#include <unistd.h> // NOLINT
+#include <sys/time.h> // NOLINT
+#include <sys/types.h> // NOLINT
+#include <sys/syscall.h> // NOLINT
+#include <sys/stat.h> // NOLINT
+#include <fcntl.h> // NOLINT
+#include <unistd.h> // NOLINT
#include "platform/memory_sanitizer.h"
#include "platform/utils.h"
@@ -34,8 +34,10 @@ namespace dart {
#ifndef PRODUCT
-DEFINE_FLAG(bool, generate_perf_events_symbols, false,
- "Generate events symbols for profiling with perf");
+DEFINE_FLAG(bool,
+ generate_perf_events_symbols,
+ false,
+ "Generate events symbols for profiling with perf");
// Linux CodeObservers.
class PerfCodeObserver : public CodeObserver {
@@ -73,8 +75,9 @@ class PerfCodeObserver : public CodeObserver {
return;
}
const char* marker = optimized ? "*" : "";
- char* buffer = OS::SCreate(Thread::Current()->zone(),
- "%" Px " %" Px " %s%s\n", base, size, marker, name);
+ char* buffer =
+ OS::SCreate(Thread::Current()->zone(), "%" Px " %" Px " %s%s\n", base,
+ size, marker, name);
{
MutexLocker ml(CodeObservers::mutex());
(*file_write)(buffer, strlen(buffer), out_file_);
@@ -192,10 +195,8 @@ int64_t OS::GetCurrentThreadCPUMicros() {
// TODO(5411554): May need to hoist these architecture dependent code
// into a architecture specific file e.g: os_ia32_linux.cc
intptr_t OS::ActivationFrameAlignment() {
-#if defined(TARGET_ARCH_IA32) || \
- defined(TARGET_ARCH_X64) || \
- defined(TARGET_ARCH_ARM64) || \
- defined(TARGET_ARCH_DBC)
+#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) || \
+ defined(TARGET_ARCH_ARM64) || defined(TARGET_ARCH_DBC)
const int kMinimumAlignment = 16;
#elif defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS)
const int kMinimumAlignment = 8;
@@ -213,10 +214,8 @@ intptr_t OS::ActivationFrameAlignment() {
intptr_t OS::PreferredCodeAlignment() {
-#if defined(TARGET_ARCH_IA32) || \
- defined(TARGET_ARCH_X64) || \
- defined(TARGET_ARCH_ARM64) || \
- defined(TARGET_ARCH_DBC)
+#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) || \
+ defined(TARGET_ARCH_ARM64) || defined(TARGET_ARCH_DBC)
const int kMinimumAlignment = 32;
#elif defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS)
const int kMinimumAlignment = 16;
@@ -372,8 +371,7 @@ bool OS::StringToInt64(const char* str, int64_t* value) {
if (str[0] == '-') {
i = 1;
}
- if ((str[i] == '0') &&
- (str[i + 1] == 'x' || str[i + 1] == 'X') &&
+ if ((str[i] == '0') && (str[i + 1] == 'x' || str[i + 1] == 'X') &&
(str[i + 2] != '\0')) {
base = 16;
}
@@ -410,8 +408,7 @@ void OS::InitOnce() {
}
-void OS::Shutdown() {
-}
+void OS::Shutdown() {}
void OS::Abort() {
« no previous file with comments | « runtime/vm/os_fuchsia.cc ('k') | runtime/vm/os_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698