]> sourceware.org Git - systemtap.git/commitdiff
PR20149: place all .function probes at entry
authorFelix Lu <flu@redhat.com>
Tue, 16 Aug 2016 14:36:57 +0000 (10:36 -0400)
committerFelix Lu <flu@redhat.com>
Wed, 17 Aug 2016 13:59:47 +0000 (09:59 -0400)
Function probes with a line specifier different than the declaration
line are forced into entry probes.

* tapsets.cxx: query_cu: fall through line probing if .function()
  present

tapsets.cxx

index db1e7ccc117c855374b1b950df99be87f85a0858..9c0a4f675d752a14eda40097dea53e9182a1c135 100644 (file)
@@ -2340,14 +2340,9 @@ query_cu (Dwarf_Die * cudie, dwarf_query * q)
               // decl_line, the user doesn't actually want to probe a lineno,
               // but rather the function itself. So let fall through to
               // query_func_info/query_inline_instance_info in final else.
-               && !q->is_fully_specified_function())
+               && !q->is_fully_specified_function()
+               && !q->has_function_str)
         {
-          // .statement(...:NN) often gets mixed up with .function(...:NN)
-          if (q->has_function_str)
-            q->sess.print_warning (_("For probing a particular line, use a "
-                                   ".statement() probe, not .function()"),
-                                   q->base_probe->tok);
-
           auto bfis = q->filtered_all();
 
           for (auto srcfile = q->filtered_srcfiles.cbegin();
@@ -2359,6 +2354,14 @@ query_cu (Dwarf_Die * cudie, dwarf_query * q)
         }
       else
         {
+          // .statement(...:NN) often gets mixed up with .function(...:NN)
+          if (q->spec_type == function_file_and_line
+              && !q->is_fully_specified_function()
+              && q->has_function_str)
+            q->sess.print_warning (_("For probing a particular line, use a "
+                                     ".statement() probe, not .function()"),
+                                   q->base_probe->tok);
+
           // Otherwise, simply probe all resolved functions.
           for (auto i = q->filtered_functions.begin();
                i != q->filtered_functions.end(); ++i)
This page took 0.043378 seconds and 5 git commands to generate.