
{"id":6539,"date":"2011-12-29T11:03:06","date_gmt":"2011-12-29T11:03:06","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=6539"},"modified":"2011-12-29T11:03:06","modified_gmt":"2011-12-29T11:03:06","slug":"kernel-tracepoint","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2011\/12\/29\/kernel-tracepoint\/","title":{"rendered":"What is a tracepoint ?"},"content":{"rendered":"<h4>Topic<\/h4>\n<pre>\n<h4>Tracepoint<\/h4>\n\n<h4>Explanation<\/h4>\n\nA  tracepoint placed in  code provides  a hook  to call  a function\n(probe) that you  can provide at runtime. A  tracepoint can be \"on\"\n(a probe is connected to it)  or \"off\" (no probe is attached). When\na tracepoint  is \"off\" it has  no effect, except for  adding a tiny\ntime penalty (checking a condition  for a branch) and space penalty\n(adding  a few  bytes  for the  function  call at  the  end of  the\ninstrumented  function and  adds  a data  structure  in a  separate\nsection).  When a  tracepoint is \"on\", the function  you provide is\ncalled  each time  the  tracepoint is  executed,  in the  execution\ncontext  of  the  caller.  When  the  function  provided  ends  its\nexecution, it returns to the caller (continuing from the tracepoint\nsite).\n\n\nsource : linux-next\/Documentation\/trace\/tracepoints.txt\n\n<h4>Get The Hang<\/h4>\n\n void bio_endio(struct bio *bio, int error)\n        else if (!test_bit(BIO_UPTODATE, &amp;bio-&gt;bi_flags))\n                error = -EIO;\n\n+       if (test_bit(BIO_IN_FLIGHT, &amp;bio-&gt;bi_flags)) {\n+               struct request_queue *q = bdev_get_queue(bio-&gt;bi_bdev);\n+\n+               trace_block_bio_complete(q, bio, error);\n+               clear_bit(BIO_IN_FLIGHT, &amp;bio-&gt;bi_flags);\n+       }\n+\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Topic Tracepoint Explanation A tracepoint placed in code provides a hook to call a function (probe) that you can provide at runtime. A tracepoint can be &#8220;on&#8221; (a probe is connected to it) or &#8220;off&#8221; (no probe is attached). When a tracepoint is &#8220;off&#8221; it has no effect, except for adding a tiny time penalty &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2011\/12\/29\/kernel-tracepoint\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;What is a tracepoint ?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[992],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/6539"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=6539"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/6539\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=6539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=6539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=6539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}