summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/mcount.c
Commit message (Collapse)AuthorAgeFilesLines
* Always use __mcount on NetBSD. Some platforms don't provide _mcount.Joerg Sonnenberger2018-07-171-10/+12
| | | | llvm-svn: 337277
* Switch -mcount and -finstrument-functions to emit EnterExitInstrumenter ↵Hans Wennborg2017-11-141-4/+4
| | | | | | | | | | | | | | | | attributes This updates -mcount to use the new attribute names (LLVM r318195), and switches over -finstrument-functions to also use these attributes rather than inserting instrumentation in the frontend. It also adds a new flag, -finstrument-functions-after-inlining, which makes the cygprofile instrumentation get inserted after inlining rather than before. Differential Revision: https://reviews.llvm.org/D39331 llvm-svn: 318199
* [mips] Create the correct profiling symbol on Linux MIPSSimon Atanasyan2017-07-111-0/+4
| | | | llvm-svn: 307627
* [Clang] Handle interaction of -pg and no_instrument_function attribute.Manoj Gupta2017-06-191-16/+23
| | | | | | | | | | | | | | | | | | | | | | Summary: Disable generation of counting-function attribute if no_instrument_function attribute is present in function. Interaction between -pg and no_instrument_function is the desired behavior and matches gcc as well. This is required for fixing a crash in Linux kernel when function tracing is enabled. Fixes PR33515. Reviewers: hfinkel, rengolin, srhines, hans Reviewed By: hfinkel Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34357 llvm-svn: 305728
* [Frontend] Fix mcount inlining bugHonggyu Kim2016-09-011-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Since some profiling tools, such as gprof, ftrace, and uftrace, use -pg option to generate a mcount function call at the entry of each function. Function invocation can be detected by this hook function. But mcount insertion is done before function inlining phase in clang, sometime a function that already has a mcount call can be inlined in the middle of another function. This patch adds an attribute "counting-function" to each function rather than emitting the mcount call directly in frontend so that this attribute can be processed in backend. Then the mcount calls can be properly inserted in backend after all the other optimizations are completed. Link: https://llvm.org/bugs/show_bug.cgi?id=28660 Reviewers: hans, rjmccall, hfinkel, rengolin, compnerd Subscribers: shenhan, cfe-commits Differential Revision: https://reviews.llvm.org/D22666 llvm-svn: 280355
* Create the correct profiling symbol on NetBSD.Joerg Sonnenberger2015-04-101-4/+14
| | | | llvm-svn: 234636
* [PowerPC] Make -pg generate calls to _mcount not mcountHal Finkel2014-03-301-0/+4
| | | | | | | | | At least on REL6 (Linux/glibc 2.12), the proper symbol for generating gprof data is _mcount, not mcount. Prior to this change, compiling with -pg would generate linking errors (because of unresolved references to mcount), after this change -pg seems at least minimally functional. llvm-svn: 205144
* Add a testcase for the mcount profiling.Roman Divacky2011-02-101-0/+4
llvm-svn: 125283
OpenPOWER on IntegriCloud