ipynb: bug fix - copy.deepcopy throws an exception with memoized methods

Calling copy.deepcopy on the results dictionary of each experiment throws an
exception if among the results objects there are some with memoized methods.

Nevertheless, the deep copy was used to correctly copy the energy data
dictionary, therefore deep copy is now performed on that data only.

Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com>
diff --git a/ipynb/android/Android_Workloads.ipynb b/ipynb/android/Android_Workloads.ipynb
index d099024..d57bde6 100644
--- a/ipynb/android/Android_Workloads.ipynb
+++ b/ipynb/android/Android_Workloads.ipynb
@@ -394,7 +394,7 @@
     "        return {\n",
     "            'dir'             : exp_dir,\n",
     "            'db_file'         : db_file,\n",
-    "            'nrg_data'        : nrg_data,\n",
+    "            'nrg_data'        : copy.deepcopy(nrg_data),\n",
     "            'nrg_file'        : nrg_file,\n",
     "            'trace_file'      : trace_file,\n",
     "        }\n",
@@ -402,7 +402,7 @@
     "        return {\n",
     "            'dir'             : exp_dir,\n",
     "            'db_file'         : db_file,\n",
-    "            'nrg_data'        : nrg_data,\n",
+    "            'nrg_data'        : copy.deepcopy(nrg_data),\n",
     "            'nrg_file'        : nrg_file,\n",
     "        }"
    ]
@@ -573,7 +573,7 @@
     "        logging.info('Test %d/%d: %s in %s configuration',\n",
     "                     idx+1, len(test_wloads), wload_kind.upper(), conf_name.upper())\n",
     "        res = experiment(wl, te.res_dir, conf_name, wload_name, iterations, collect)\n",
-    "        results[conf_name][wload_name] = copy.deepcopy(res)\n",
+    "        results[conf_name][wload_name] = res\n",
     "\n",
     "    # Save collected results\n",
     "    res_file = os.path.join(te.res_dir, conf_name, 'results.json')\n",
diff --git a/ipynb/android/workloads/Android_Recents_Fling.ipynb b/ipynb/android/workloads/Android_Recents_Fling.ipynb
index c83a3f3..7926371 100644
--- a/ipynb/android/workloads/Android_Recents_Fling.ipynb
+++ b/ipynb/android/workloads/Android_Recents_Fling.ipynb
@@ -56,7 +56,6 @@
    "source": [
     "%pylab inline\n",
     "\n",
-    "import copy\n",
     "import os\n",
     "from time import sleep\n",
     "\n",
@@ -517,8 +516,7 @@
     "# Run the benchmark in all the configured governors\n",
     "for governor in confs:\n",
     "    test_dir = os.path.join(te.res_dir, governor)\n",
-    "    res = experiment(governor, test_dir)\n",
-    "    results[governor] = copy.deepcopy(res)"
+    "    results[governor] = experiment(governor, test_dir)"
    ]
   },
   {
diff --git a/ipynb/android/workloads/Android_YouTube.ipynb b/ipynb/android/workloads/Android_YouTube.ipynb
index 7a3c27a..a648290 100644
--- a/ipynb/android/workloads/Android_YouTube.ipynb
+++ b/ipynb/android/workloads/Android_YouTube.ipynb
@@ -54,7 +54,6 @@
    "source": [
     "%pylab inline\n",
     "\n",
-    "import copy\n",
     "import os\n",
     "import pexpect as pe\n",
     "from time import sleep\n",
@@ -442,8 +441,8 @@
     "# Run the benchmark in all the configured governors\n",
     "for governor in confs:\n",
     "    test_dir = os.path.join(te.res_dir, governor)\n",
-    "    res = experiment(governor, test_dir, collect='systrace', trace_time=15)\n",
-    "    results[governor] = copy.deepcopy(res)"
+    "    results[governor] = experiment(governor, test_dir,\n",
+    "                                   collect='systrace', trace_time=15)"
    ]
   },
   {
diff --git a/ipynb/sched_dvfs/smoke_test.ipynb b/ipynb/sched_dvfs/smoke_test.ipynb
index 0817b3e..9eab63f 100644
--- a/ipynb/sched_dvfs/smoke_test.ipynb
+++ b/ipynb/sched_dvfs/smoke_test.ipynb
@@ -343,7 +343,7 @@
     "    # return all the experiment data\n",
     "    return {\n",
     "        'dir'      : exp_dir,\n",
-    "        'energy'   : nrg,\n",
+    "        'energy'   : copy.deepcopy(nrg),\n",
     "        'trace'    : trace_file,\n",
     "        'tr'       : tr,\n",
     "        'ftrace'   : tr.ftrace\n",
@@ -360,8 +360,7 @@
     "    results[tid] = {}\n",
     "    for governor in confs:\n",
     "        test_dir = os.path.join(res_dir, governor)\n",
-    "        res = experiment(governor, rtapp, test_dir)\n",
-    "        results[tid][governor] = copy.deepcopy(res)\n",
+    "        results[tid][governor] = experiment(governor, rtapp, test_dir)\n",
     "        \n",
     "def plot(tid):\n",
     "    global results\n",