diff --git a/base/HidlInternal.cpp b/base/HidlInternal.cpp
index 45afda3..9c0efbb 100644
--- a/base/HidlInternal.cpp
+++ b/base/HidlInternal.cpp
@@ -19,6 +19,14 @@
 #include <hidl/HidlInternal.h>
 
 #include <android-base/logging.h>
+#include <cutils/properties.h>
+
+#ifdef LIBHIDL_TARGET_DEBUGGABLE
+#include <dirent.h>
+#include <dlfcn.h>
+#include <hidl-util/FQName.h>
+#include <regex>
+#endif
 
 namespace android {
 namespace hardware {
@@ -28,6 +36,113 @@
     LOG(FATAL) << message;
 }
 
+// ----------------------------------------------------------------------
+// HidlInstrumentor implementation.
+HidlInstrumentor::HidlInstrumentor(
+        const std::string &package,
+        const std::string &interface)
+        : mInstrumentationLibPackage(package), mInterfaceName(interface) {
+    configureInstrumentation(false);
+}
+
+HidlInstrumentor:: ~HidlInstrumentor() {}
+
+void HidlInstrumentor::configureInstrumentation(bool log) {
+    bool enable_instrumentation = property_get_bool(
+            "hal.instrumentation.enable",
+            false);
+    if (enable_instrumentation != mEnableInstrumentation) {
+        mEnableInstrumentation = enable_instrumentation;
+        if (mEnableInstrumentation) {
+            if (log) {
+                LOG(INFO) << "Enable instrumentation.";
+            }
+            registerInstrumentationCallbacks (&mInstrumentationCallbacks);
+        } else {
+            if (log) {
+                LOG(INFO) << "Disable instrumentation.";
+            }
+            mInstrumentationCallbacks.clear();
+        }
+    }
+}
+
+void HidlInstrumentor::registerInstrumentationCallbacks(
+        std::vector<InstrumentationCallback> *instrumentationCallbacks) {
+#ifdef LIBHIDL_TARGET_DEBUGGABLE
+    std::vector<std::string> instrumentationLibPaths;
+    char instrumentation_lib_path[PROPERTY_VALUE_MAX];
+    if (property_get("hal.instrumentation.lib.path",
+                     instrumentation_lib_path,
+                     "") > 0) {
+        instrumentationLibPaths.push_back(instrumentation_lib_path);
+    } else {
+        instrumentationLibPaths.push_back(HAL_LIBRARY_PATH_SYSTEM);
+        instrumentationLibPaths.push_back(HAL_LIBRARY_PATH_VENDOR);
+        instrumentationLibPaths.push_back(HAL_LIBRARY_PATH_ODM);
+    }
+
+    for (auto path : instrumentationLibPaths) {
+        DIR *dir = opendir(path.c_str());
+        if (dir == 0) {
+            LOG(WARNING) << path << " does not exist. ";
+            return;
+        }
+
+        struct dirent *file;
+        while ((file = readdir(dir)) != NULL) {
+            if (!isInstrumentationLib(file))
+                continue;
+
+            void *handle = dlopen((path + file->d_name).c_str(), RTLD_NOW);
+            char *error;
+            if (handle == nullptr) {
+                LOG(WARNING) << "couldn't load file: " << file->d_name
+                    << " error: " << dlerror();
+                continue;
+            }
+
+            dlerror(); /* Clear any existing error */
+
+            using cb_fun = void (*)(
+                    const InstrumentationEvent,
+                    const char *,
+                    const char *,
+                    const char *,
+                    const char *,
+                    std::vector<void *> *);
+            FQName package_name = FQName(mInstrumentationLibPackage);
+            auto cb = (cb_fun)dlsym(handle, ("HIDL_INSTRUMENTATION_FUNCTION_"
+                        + package_name.tokenName() + "_"
+                        + mInterfaceName).c_str());
+            if ((error = dlerror()) != NULL) {
+                LOG(WARNING)
+                    << "couldn't find symbol: HIDL_INSTRUMENTATION_FUNCTION_"
+                    << mInterfaceName << ", error: " << error;
+                continue;
+            }
+            instrumentationCallbacks->push_back(cb);
+            LOG(INFO) << "Register instrumentation callback from "
+                << file->d_name;
+        }
+        closedir(dir);
+    }
+#else
+    // No-op for user builds.
+    return;
+#endif
+}
+
+bool HidlInstrumentor::isInstrumentationLib(const dirent *file) {
+#ifdef LIBHIDL_TARGET_DEBUGGABLE
+    if (file->d_type != DT_REG) return false;
+    std::cmatch cm;
+    std::regex e("^" + mInstrumentationLibPackage + "(.*).profiler.so$");
+    if (std::regex_match(file->d_name, cm, e)) return true;
+#endif
+    return false;
+}
+
 }  // namespace details
 }  // namespace hardware
 }  // namespace android
diff --git a/base/HidlSupport.cpp b/base/HidlSupport.cpp
index 3bd68af..1544969 100644
--- a/base/HidlSupport.cpp
+++ b/base/HidlSupport.cpp
@@ -25,13 +25,6 @@
 #include <vintf/VendorManifest.h>
 #include <vintf/parse_string.h>
 
-#ifdef LIBHIDL_TARGET_DEBUGGABLE
-#include <cutils/properties.h>
-#include <dlfcn.h>
-#include <regex>
-#include <utility>
-#endif
-
 namespace android {
 namespace hardware {
 vintf::Transport getTransportForFrameworkPackages(const std::string &name) {
@@ -316,113 +309,6 @@
     return mSize == 0;
 }
 
-// ----------------------------------------------------------------------
-// HidlInstrumentor implementation.
-HidlInstrumentor::HidlInstrumentor(
-        const std::string &package,
-        const std::string &interface)
-        : mInstrumentationLibPackage(package), mInterfaceName(interface) {
-    configureInstrumentation(false);
-}
-
-HidlInstrumentor:: ~HidlInstrumentor() {}
-
-void HidlInstrumentor::configureInstrumentation(bool log) {
-    bool enable_instrumentation = property_get_bool(
-            "hal.instrumentation.enable",
-            false);
-    if (enable_instrumentation != mEnableInstrumentation) {
-        mEnableInstrumentation = enable_instrumentation;
-        if (mEnableInstrumentation) {
-            if (log) {
-                LOG(INFO) << "Enable instrumentation.";
-            }
-            registerInstrumentationCallbacks (&mInstrumentationCallbacks);
-        } else {
-            if (log) {
-                LOG(INFO) << "Disable instrumentation.";
-            }
-            mInstrumentationCallbacks.clear();
-        }
-    }
-}
-
-void HidlInstrumentor::registerInstrumentationCallbacks(
-        std::vector<InstrumentationCallback> *instrumentationCallbacks) {
-#ifdef LIBHIDL_TARGET_DEBUGGABLE
-    std::vector<std::string> instrumentationLibPaths;
-    char instrumentation_lib_path[PROPERTY_VALUE_MAX];
-    if (property_get("hal.instrumentation.lib.path",
-                     instrumentation_lib_path,
-                     "") > 0) {
-        instrumentationLibPaths.push_back(instrumentation_lib_path);
-    } else {
-        instrumentationLibPaths.push_back(HAL_LIBRARY_PATH_SYSTEM);
-        instrumentationLibPaths.push_back(HAL_LIBRARY_PATH_VENDOR);
-        instrumentationLibPaths.push_back(HAL_LIBRARY_PATH_ODM);
-    }
-
-    for (auto path : instrumentationLibPaths) {
-        DIR *dir = opendir(path.c_str());
-        if (dir == 0) {
-            LOG(WARNING) << path << " does not exist. ";
-            return;
-        }
-
-        struct dirent *file;
-        while ((file = readdir(dir)) != NULL) {
-            if (!isInstrumentationLib(file))
-                continue;
-
-            void *handle = dlopen((path + file->d_name).c_str(), RTLD_NOW);
-            char *error;
-            if (handle == nullptr) {
-                LOG(WARNING) << "couldn't load file: " << file->d_name
-                    << " error: " << dlerror();
-                continue;
-            }
-
-            dlerror(); /* Clear any existing error */
-
-            using cb_fun = void (*)(
-                    const InstrumentationEvent,
-                    const char *,
-                    const char *,
-                    const char *,
-                    const char *,
-                    std::vector<void *> *);
-            FQName package_name = FQName(mInstrumentationLibPackage);
-            auto cb = (cb_fun)dlsym(handle, ("HIDL_INSTRUMENTATION_FUNCTION_"
-                        + package_name.tokenName() + "_"
-                        + mInterfaceName).c_str());
-            if ((error = dlerror()) != NULL) {
-                LOG(WARNING)
-                    << "couldn't find symbol: HIDL_INSTRUMENTATION_FUNCTION_"
-                    << mInterfaceName << ", error: " << error;
-                continue;
-            }
-            instrumentationCallbacks->push_back(cb);
-            LOG(INFO) << "Register instrumentation callback from "
-                << file->d_name;
-        }
-        closedir(dir);
-    }
-#else
-    // No-op for user builds.
-    return;
-#endif
-}
-
-bool HidlInstrumentor::isInstrumentationLib(const dirent *file) {
-#ifdef LIBHIDL_TARGET_DEBUGGABLE
-    if (file->d_type != DT_REG) return false;
-    std::cmatch cm;
-    std::regex e("^" + mInstrumentationLibPackage + "(.*).profiler.so$");
-    if (std::regex_match(file->d_name, cm, e)) return true;
-#endif
-    return false;
-}
-
 }  // namespace hardware
 }  // namespace android
 
diff --git a/base/include/hidl/HidlInternal.h b/base/include/hidl/HidlInternal.h
index 24e17cb..80543c0 100644
--- a/base/include/hidl/HidlInternal.h
+++ b/base/include/hidl/HidlInternal.h
@@ -18,6 +18,10 @@
 #define ANDROID_HIDL_INTERNAL_H
 
 #include <cstdint>
+#include <dirent.h>
+#include <functional>
+#include <string>
+#include <vector>
 #include <utility>
 
 namespace android {
@@ -93,6 +97,84 @@
     };
 };
 
+#if defined(__LP64__)
+#define HAL_LIBRARY_PATH_SYSTEM "/system/lib64/hw/"
+#define HAL_LIBRARY_PATH_VENDOR "/vendor/lib64/hw/"
+#define HAL_LIBRARY_PATH_ODM "/odm/lib64/hw/"
+#else
+#define HAL_LIBRARY_PATH_SYSTEM "/system/lib/hw/"
+#define HAL_LIBRARY_PATH_VENDOR "/vendor/lib/hw/"
+#define HAL_LIBRARY_PATH_ODM "/odm/lib/hw/"
+#endif
+
+// ----------------------------------------------------------------------
+// Class that provides Hidl instrumentation utilities.
+struct HidlInstrumentor {
+    // Event that triggers the instrumentation. e.g. enter of an API call on
+    // the server/client side, exit of an API call on the server/client side
+    // etc.
+    enum InstrumentationEvent {
+        SERVER_API_ENTRY = 0,
+        SERVER_API_EXIT,
+        CLIENT_API_ENTRY,
+        CLIENT_API_EXIT,
+        SYNC_CALLBACK_ENTRY,
+        SYNC_CALLBACK_EXIT,
+        ASYNC_CALLBACK_ENTRY,
+        ASYNC_CALLBACK_EXIT,
+        PASSTHROUGH_ENTRY,
+        PASSTHROUGH_EXIT,
+    };
+
+    // Signature of the instrumentation callback function.
+    using InstrumentationCallback = std::function<void(
+            const InstrumentationEvent event,
+            const char *package,
+            const char *version,
+            const char *interface,
+            const char *method,
+            std::vector<void *> *args)>;
+
+    explicit HidlInstrumentor(
+            const std::string &package,
+            const std::string &insterface);
+    virtual ~HidlInstrumentor();
+
+ protected:
+    // Set mEnableInstrumentation based on system property
+    // hal.instrumentation.enable, register/de-register instrumentation
+    // callbacks if mEnableInstrumentation is true/false.
+    void configureInstrumentation(bool log=true);
+    // Function that lookup and dynamically loads the hidl instrumentation
+    // libraries and registers the instrumentation callback functions.
+    //
+    // The instrumentation libraries should be stored under any of the following
+    // directories: HAL_LIBRARY_PATH_SYSTEM, HAL_LIBRARY_PATH_VENDOR and
+    // HAL_LIBRARY_PATH_ODM. The name of instrumentation libraries should
+    // follow pattern: ^profilerPrefix(.*).profiler.so$
+    //
+    // Each instrumentation library is expected to implement the instrumentation
+    // function called HIDL_INSTRUMENTATION_FUNCTION.
+    //
+    // A no-op for user build.
+    void registerInstrumentationCallbacks(
+            std::vector<InstrumentationCallback> *instrumentationCallbacks);
+
+    // Utility function to determine whether a give file is a instrumentation
+    // library (i.e. the file name follow the expected pattern).
+    bool isInstrumentationLib(const dirent *file);
+
+    // A list of registered instrumentation callbacks.
+    std::vector<InstrumentationCallback> mInstrumentationCallbacks;
+    // Flag whether to enable instrumentation.
+    bool mEnableInstrumentation;
+    // Prefix to lookup the instrumentation libraries.
+    std::string mInstrumentationLibPackage;
+    // Used for dlsym to load the profiling method for given interface.
+    std::string mInterfaceName;
+
+};
+
 }  // namespace details
 }  // namespace hardware
 }  // namespace android
diff --git a/base/include/hidl/HidlSupport.h b/base/include/hidl/HidlSupport.h
index 6c00c3d..80f95b6 100644
--- a/base/include/hidl/HidlSupport.h
+++ b/base/include/hidl/HidlSupport.h
@@ -19,11 +19,8 @@
 
 #include <algorithm>
 #include <array>
-#include <dirent.h>
 #include <iterator>
 #include <cutils/native_handle.h>
-#include <cutils/properties.h>
-#include <functional>
 #include <hidl/HidlInternal.h>
 #include <hidl/Status.h>
 #include <map>
@@ -795,84 +792,6 @@
     return hidl_version(major,minor);
 }
 
-#if defined(__LP64__)
-#define HAL_LIBRARY_PATH_SYSTEM "/system/lib64/hw/"
-#define HAL_LIBRARY_PATH_VENDOR "/vendor/lib64/hw/"
-#define HAL_LIBRARY_PATH_ODM "/odm/lib64/hw/"
-#else
-#define HAL_LIBRARY_PATH_SYSTEM "/system/lib/hw/"
-#define HAL_LIBRARY_PATH_VENDOR "/vendor/lib/hw/"
-#define HAL_LIBRARY_PATH_ODM "/odm/lib/hw/"
-#endif
-
-// ----------------------------------------------------------------------
-// Class that provides Hidl instrumentation utilities.
-struct HidlInstrumentor {
-    // Event that triggers the instrumentation. e.g. enter of an API call on
-    // the server/client side, exit of an API call on the server/client side
-    // etc.
-    enum InstrumentationEvent {
-        SERVER_API_ENTRY = 0,
-        SERVER_API_EXIT,
-        CLIENT_API_ENTRY,
-        CLIENT_API_EXIT,
-        SYNC_CALLBACK_ENTRY,
-        SYNC_CALLBACK_EXIT,
-        ASYNC_CALLBACK_ENTRY,
-        ASYNC_CALLBACK_EXIT,
-        PASSTHROUGH_ENTRY,
-        PASSTHROUGH_EXIT,
-    };
-
-    // Signature of the instrumentation callback function.
-    using InstrumentationCallback = std::function<void(
-            const InstrumentationEvent event,
-            const char *package,
-            const char *version,
-            const char *interface,
-            const char *method,
-            std::vector<void *> *args)>;
-
-    explicit HidlInstrumentor(
-            const std::string &package,
-            const std::string &insterface);
-    virtual ~HidlInstrumentor();
-
- protected:
-    // Set mEnableInstrumentation based on system property
-    // hal.instrumentation.enable, register/de-register instrumentation
-    // callbacks if mEnableInstrumentation is true/false.
-    void configureInstrumentation(bool log=true);
-    // Function that lookup and dynamically loads the hidl instrumentation
-    // libraries and registers the instrumentation callback functions.
-    //
-    // The instrumentation libraries should be stored under any of the following
-    // directories: HAL_LIBRARY_PATH_SYSTEM, HAL_LIBRARY_PATH_VENDOR and
-    // HAL_LIBRARY_PATH_ODM. The name of instrumentation libraries should
-    // follow pattern: ^profilerPrefix(.*).profiler.so$
-    //
-    // Each instrumentation library is expected to implement the instrumentation
-    // function called HIDL_INSTRUMENTATION_FUNCTION.
-    //
-    // A no-op for user build.
-    void registerInstrumentationCallbacks(
-            std::vector<InstrumentationCallback> *instrumentationCallbacks);
-
-    // Utility function to determine whether a give file is a instrumentation
-    // library (i.e. the file name follow the expected pattern).
-    bool isInstrumentationLib(const dirent *file);
-
-    // A list of registered instrumentation callbacks.
-    std::vector<InstrumentationCallback> mInstrumentationCallbacks;
-    // Flag whether to enable instrumentation.
-    bool mEnableInstrumentation;
-    // Prefix to lookup the instrumentation libraries.
-    std::string mInstrumentationLibPackage;
-    // Used for dlsym to load the profiling method for given interface.
-    std::string mInterfaceName;
-
-};
-
 ///////////////////// toString functions
 
 namespace details {
