|  | @@ -29,6 +29,7 @@ fi
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  # task vars
 | 
	
		
			
				|  |  |  build_debug=false
 | 
	
		
			
				|  |  | +build_profile=false
 | 
	
		
			
				|  |  |  build_release=false
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  test_debug=false
 | 
	
	
		
			
				|  | @@ -44,7 +45,7 @@ export CMAKE_EXPORT_COMPILE_COMMANDS=true
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  # parsing
 | 
	
		
			
				|  |  |  if [ "$task" = "clean" ]; then
 | 
	
		
			
				|  |  | -    rm -rf build_debug build_release install
 | 
	
		
			
				|  |  | +    rm -rf build_debug build_profile build_release install
 | 
	
		
			
				|  |  |  elif [ "$task" = "build" ]; then
 | 
	
		
			
				|  |  |      type=$2
 | 
	
		
			
				|  |  |      if [ "$type" = "debug" ]; then
 | 
	
	
		
			
				|  | @@ -101,7 +102,7 @@ elif [ "$task" = "valgrind" ]; then
 | 
	
		
			
				|  |  |      fi
 | 
	
		
			
				|  |  |      valgrind="valgrind"
 | 
	
		
			
				|  |  |  elif [ "$task" = "performance" ]; then
 | 
	
		
			
				|  |  | -    build_release=true
 | 
	
		
			
				|  |  | +    build_profile=true
 | 
	
		
			
				|  |  |      performance=true
 | 
	
		
			
				|  |  |  elif [ "$task" = "time" ]; then
 | 
	
		
			
				|  |  |      build_release=true
 | 
	
	
		
			
				|  | @@ -127,6 +128,9 @@ buildProfile() {
 | 
	
		
			
				|  |  |  if $build_debug; then
 | 
	
		
			
				|  |  |      buildProfile build_debug -DCMAKE_BUILD_TYPE=Debug
 | 
	
		
			
				|  |  |  fi
 | 
	
		
			
				|  |  | +if $build_profile; then
 | 
	
		
			
				|  |  | +    buildProfile build_profile -DCMAKE_BUILD_TYPE=RelWithDebInfo
 | 
	
		
			
				|  |  | +fi
 | 
	
		
			
				|  |  |  if $build_release; then
 | 
	
		
			
				|  |  |      buildProfile build_release -DCMAKE_BUILD_TYPE=Release
 | 
	
		
			
				|  |  |  fi
 | 
	
	
		
			
				|  | @@ -158,8 +162,11 @@ if $test_release; then
 | 
	
		
			
				|  |  |      cd ..
 | 
	
		
			
				|  |  |  fi
 | 
	
		
			
				|  |  |  if $performance; then
 | 
	
		
			
				|  |  | -    cd build_release
 | 
	
		
			
				|  |  | -    ./performance
 | 
	
		
			
				|  |  | +    cd build_profile
 | 
	
		
			
				|  |  | +    user=$(whoami)
 | 
	
		
			
				|  |  | +    sudo perf record ./performance
 | 
	
		
			
				|  |  | +    sudo chown $user:$user perf.data
 | 
	
		
			
				|  |  | +    perf report
 | 
	
		
			
				|  |  |      cd ..
 | 
	
		
			
				|  |  |  fi
 | 
	
		
			
				|  |  |  if $time; then
 |