Skip to content

Commit

Permalink
Merge pull request #4278 from LinHu2016/master
Browse files Browse the repository at this point in the history
Update hook tracepoint threshold to microsecond instead of millisecond
  • Loading branch information
youngar authored Sep 10, 2019
2 parents 57e8ed7 + 07b3609 commit b2d2ccd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include_core/omrhookable.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2017 IBM Corp. and others
* Copyright (c) 1991, 2019 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -76,7 +76,7 @@ typedef struct J9HookInterface {
#define J9HOOK_AGENTID_LAST ((uintptr_t)-1)

/* time threshold (=100 milliseconds) for triggering the tracepoint */
#define OMRHOOK_DEFAULT_THRESHOLD_IN_MILLISECONDS_WARNING_CALLBACK_ELAPSED_TIME 100
#define OMRHOOK_DEFAULT_THRESHOLD_IN_MICROSECONDS_WARNING_CALLBACK_ELAPSED_TIME (100 * 1000)

/* array of OMREventInfo4Dump is added in individual hookInterface by Hook generation tool to avoid
rumtime native memory allocation(malloc), use this macro to access &infos4Dump[event]
Expand Down
4 changes: 2 additions & 2 deletions util/hookable/hookable.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2017 IBM Corp. and others
* Copyright (c) 1991, 2019 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -141,7 +141,7 @@ J9HookInitializeInterface(struct J9HookInterface **hookInterface, OMRPortLibrary

commonInterface->nextAgentID = J9HOOK_AGENTID_DEFAULT + 1;
commonInterface->portLib = portLib;
commonInterface->threshold4Trace = OMRHOOK_DEFAULT_THRESHOLD_IN_MILLISECONDS_WARNING_CALLBACK_ELAPSED_TIME;
commonInterface->threshold4Trace = OMRHOOK_DEFAULT_THRESHOLD_IN_MICROSECONDS_WARNING_CALLBACK_ELAPSED_TIME;

commonInterface->eventSize = (interfaceSize - sizeof(J9CommonHookInterface)) / (sizeof(U_8) + sizeof(OMREventInfo4Dump) + sizeof(J9HookRecord*));
return 0;
Expand Down

0 comments on commit b2d2ccd

Please sign in to comment.