Skip to content

Commit

Permalink
Whitespace at EOL
Browse files Browse the repository at this point in the history
  • Loading branch information
apangin committed Sep 25, 2024
1 parent 0ed06fa commit 2833cab
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/arguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Error Arguments::parse(const char* args) {
}
char* args_copy = strcpy(_buf + EXTRA_BUF_SIZE, args);

const char* msg = NULL;
const char* msg = NULL;

for (char* arg = strtok(args_copy, ","); arg != NULL; arg = strtok(NULL, ",")) {
char* value = strchr(arg, '=');
Expand Down
2 changes: 1 addition & 1 deletion src/flameGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void FlameGraph::printTreeFrame(Writer& out, const Trie& f, int level, const cha
StringUtils::replace(name, '>', ">", 4);

const char* div_class = trie->_children.empty() ? " class=\"o\"" : "";

if (_reverse) {
snprintf(_buf, sizeof(_buf) - 1,
"<li><div%s>%.2f%% [%s]</div> <span class=\"t%d\">%s</span>\n",
Expand Down
2 changes: 1 addition & 1 deletion src/itimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Error ITimer::start(Arguments& args) {
time_t sec = _interval / 1000000000;
suseconds_t usec = (_interval % 1000000000) / 1000;
struct itimerval tv = {{sec, usec}, {sec, usec}};

if (setitimer(ITIMER_PROF, &tv, NULL) != 0) {
return Error("ITIMER_PROF is not supported on this system");
}
Expand Down
2 changes: 1 addition & 1 deletion src/j9StackTraces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static JNIEnv* _self_env = NULL;


Error J9StackTraces::start(Arguments& args) {
_max_stack_depth = args._jstackdepth;
_max_stack_depth = args._jstackdepth;

if (pipe(_pipe) != 0) {
return Error("Failed to create pipe");
Expand Down
4 changes: 2 additions & 2 deletions src/lockTracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void LockTracer::initialize() {
jni_functions->RegisterNatives = RegisterNativesHook;
jvmti->SetJNIFunctionTable(jni_functions);

// Trace Unsafe.registerNatives() to find the original address of Unsafe.park() native
// Trace Unsafe.registerNatives() to find the original address of Unsafe.park() native
env->CallStaticVoidMethod(_UnsafeClass, register_natives);

jni_functions->RegisterNatives = _orig_RegisterNatives;
Expand Down Expand Up @@ -132,7 +132,7 @@ jint JNICALL LockTracer::RegisterNativesHook(JNIEnv* env, jclass cls, const JNIN
if (strcmp(methods[i].name, "park") == 0 && strcmp(methods[i].signature, "(ZJ)V") == 0) {
_orig_Unsafe_park = (UnsafeParkFunc)methods[i].fnPtr;
break;
}
}
}
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/os_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ int OS::threadId() {
const char* OS::schedPolicy(int thread_id) {
int sched_policy = sched_getscheduler(thread_id);
if (sched_policy >= SCHED_BATCH) {
return sched_policy >= SCHED_IDLE ? "SCHED_IDLE" : "SCHED_BATCH";
return sched_policy >= SCHED_IDLE ? "SCHED_IDLE" : "SCHED_BATCH";
}
return "SCHED_OTHER";
}
Expand Down
2 changes: 1 addition & 1 deletion src/profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ void Profiler::switchThreadEvents(jvmtiEventMode mode) {

/*
* Dump stacks in FlameGraph input format:
*
*
* <frame>;<frame>;...;<topmost frame> <count>
*/
void Profiler::dumpCollapsed(Writer& out, Arguments& args) {
Expand Down
2 changes: 1 addition & 1 deletion src/stackFrame_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ bool StackFrame::checkInterruptedSyscall() {
if (REG(pstate, cpsr) & (1 << 29)) {
return (retval() & 0xff) == EINTR || (retval() & 0xff) == ETIMEDOUT;
} else {
return retval() == (uintptr_t)-EINTR;
return retval() == (uintptr_t)-EINTR;
}
#else
if (retval() == (uintptr_t)-EINTR) {
Expand Down
2 changes: 1 addition & 1 deletion src/stackFrame_x64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ bool StackFrame::checkInterruptedSyscall() {
if (REG(EFL, rflags) & 1) {
return (retval() & 0xff) == EINTR || (retval() & 0xff) == ETIMEDOUT;
} else {
return retval() == (uintptr_t)-EINTR;
return retval() == (uintptr_t)-EINTR;
}
#else
if (retval() == (uintptr_t)-EINTR) {
Expand Down
2 changes: 1 addition & 1 deletion src/threadFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "threadFilter.h"
#include "os.h"


ThreadFilter::ThreadFilter() {
memset(_bitmap, 0, sizeof(_bitmap));
_bitmap[0] = (u32*)OS::safeAlloc(BITMAP_SIZE);
Expand Down
2 changes: 1 addition & 1 deletion src/tsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const u64 NANOTIME_FREQ = 1000000000;

static inline u64 rdtsc() {
u32 lo, hi;
asm volatile("rdtsc" : "=a" (lo), "=d" (hi));
asm volatile("rdtsc" : "=a" (lo), "=d" (hi));
return ((u64)hi << 32) | lo;
}

Expand Down
4 changes: 2 additions & 2 deletions test/test/c/nativeApi.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int main(int argc, char** argv) {

char cmd[4096];
snprintf(cmd, sizeof(cmd), "start,event=cpu,interval=1ms,wall=10ms,cstack=dwarf,loglevel=debug,file=%s", argv[1]);

printf("Starting profiler\n");
asprof_execute_t asprof_execute = dlsym(lib, "asprof_execute");
asprof_error_t err = asprof_execute(cmd, NULL);
Expand All @@ -46,7 +46,7 @@ int main(int argc, char** argv) {
}

uninterruptible_sleep(2000);

printf("Stopping profiler\n");
err = asprof_execute("stop", NULL);
if (err != NULL) {
Expand Down

0 comments on commit 2833cab

Please sign in to comment.