]> sourceware.org Git - systemtap.git/commitdiff
task_finder_vma.c (__stp_tf_vma_new_entry): No unnecessary atomic allocs.
authorMark Wielaard <mjw@redhat.com>
Fri, 16 Dec 2011 18:25:32 +0000 (19:25 +0100)
committerMark Wielaard <mjw@redhat.com>
Fri, 16 Dec 2011 18:25:32 +0000 (19:25 +0100)
We can be a little nicer when allocating kernel memory under the
traditional task_finder which uses utrace. See
http://sourceware.org/ml/systemtap/2011-q4/msg00357.html

runtime/task_finder_vma.c

index 093d307186097a60f6e25a934b120aa014880ffd..b5da441c6cd80b29c8894ad003576139c1eeb1b7 100644 (file)
@@ -51,9 +51,13 @@ __stp_tf_vma_new_entry(void)
 {
        struct __stp_tf_vma_entry *entry;
        size_t size = sizeof (struct __stp_tf_vma_entry);
-
+#ifdef CONFIG_UTRACE
+       entry = (struct __stp_tf_vma_entry *) _stp_kmalloc_gfp(size,
+                                                         STP_ALLOC_SLEEP_FLAGS);
+#else
        entry = (struct __stp_tf_vma_entry *) _stp_kmalloc_gfp(size,
                                                                STP_ALLOC_FLAGS);
+#endif
        return entry;
 }
 
This page took 0.029448 seconds and 5 git commands to generate.