[REFACTOR] Generating probes 60/39060/2
authorAlexander Aksenov <a.aksenov@samsung.com>
Tue, 17 Mar 2015 13:54:31 +0000 (16:54 +0300)
committerAlexander Aksenov <a.aksenov@samsung.com>
Fri, 15 May 2015 12:12:56 +0000 (15:12 +0300)
Change-Id: I09cb0cd7a2b279f536d75311d488de221953db56
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
scripts/gen_maps_header.sh

index 45da8230d8567831b4e2bcff90bde46a9114c08c..56a5087eaee248206acc042a85e20bc2a047a04e 100644 (file)
@@ -98,9 +98,9 @@ function print_lib_probe_py()
 {
     addr=$1
     handl_addr=$2
-    block_type=$3
+    probe_type=$3
     func=$4
-    echo -e "\t\t\t(0x$addr, 2, (0x$handl_addr, $block_type, \"xxxx\", \"p\", \"$func\")),">>$py_output
+    echo -e "\t\t\t(0x$addr, 2, (0x$handl_addr, $probe_type, \"xxxx\", \"p\", \"$func\")),">>$py_output
 }
 
 # C genarating
@@ -127,7 +127,7 @@ function print_section_begin_c()
     echo -e "struct ld_probe_el_t{" >> $c_output_types
     echo -e "\tuint64_t orig_addr;" >> $c_output_types
     echo -e "\tuint64_t handler_addr;" >> $c_output_types
-    echo -e "\tuint8_t block_type;" >> $c_output_types
+    echo -e "\tuint8_t probe_type;" >> $c_output_types
     echo -e "};\n" >> $c_output_types
 
     echo -e "struct ld_lib_list_el_t{" >> $c_output_types
@@ -277,10 +277,10 @@ function print_lib_probe_c()
 {
     addr=$1
     handl_addr=$2
-    block_type=$3
+    probe_type=$3
     func=$4
     let probe_count=${probe_count}+1
-    echo -e "\t\t\t\t{0x$addr, 0x$handl_addr, $block_type /* \"$func\" */},">>$c_output
+    echo -e "\t\t\t\t{0x$addr, 0x$handl_addr, $probe_type /* \"$func\" */},">>$c_output
 }
 #####################
 # global generation #
@@ -439,11 +439,15 @@ function generate_addres_list()
             cur_feature=`echo $line | awk '{print $1}'`
             cur_lib=`echo $line | awk '{print $2}'`
             cur_func=`echo $line | awk '{print $3}'`
+            if [ "`echo $cur_feature | grep \"ALWAYS\"`" != "" ]; then
+                cur_probe_type=1
+            else
+                cur_probe_type=0
+            fi
             if [ `echo $line | awk '{print $4}'` == "__nonblocking_probe__" ]; then
-                cur_block_type="0"
+                ((cur_probe_type+=2))
                 cur_filename=`echo $line | awk '{print $5}'`
             else
-                cur_block_type="1"
                 cur_filename=`echo $line | awk '{print $4}'`
             fi
 
@@ -483,7 +487,7 @@ function generate_addres_list()
                 continue
             fi
 
-            print_lib_probe "$addr" "$handl_addr" "$cur_block_type" "$cur_func"
+            print_lib_probe "$addr" "$handl_addr" "$cur_probe_type" "$cur_func"
 
         fi
     done < $1