Merge branch 'tizen_2.4' into tizen_2.4_dev
[kernel/swap-modules.git] / preload / preload_control.c
index 37cff11..bce8183 100644 (file)
@@ -210,6 +210,15 @@ static bool __is_instrumented(void *caller)
 }
 
 
+/* Called only form handlers. If we're there, then it is instrumented. */
+enum preload_call_type preload_control_call_type_always_inst(void *caller)
+{
+       if (__is_instrumented(caller))
+               return INTERNAL_CALL;
+
+       return EXTERNAL_CALL;
+
+}
 
 enum preload_call_type preload_control_call_type(struct us_ip *ip, void *caller)
 {
@@ -248,6 +257,9 @@ unsigned int preload_control_get_bin_names(char ***filenames_p)
        int i;
        unsigned int ret = 0;
 
+       if (target_binaries_cnt == 0)
+               return 0;
+
        __target_binaries_lock();
 
        *filenames_p = kmalloc(sizeof(**filenames_p) * target_binaries_cnt,