cpu_sampler: support -fno-omit-frame-poiner builds

This commit is contained in:
Christian Helmuth 2017-03-21 15:30:39 +01:00
parent cb43e04691
commit 139525b6c9

View File

@ -11,18 +11,22 @@
* under the terms of the GNU Affero General Public License version 3.
*/
#include <base/component.h>
#include <base/log.h>
void __attribute((noinline)) func()
{
for (;;) { }
for (;;) {
/* define an exact label to support -fno-omit-frame-poiner */
asm volatile (".global label_in_loop\nlabel_in_loop:");
}
}
int main(int argc, char *argv[])
extern int label_in_loop;
void Component::construct(Genode::Env &)
{
Genode::log("Test started. func: ", func);
Genode::log("Test started. func: ", &label_in_loop);
func();
return 0;
}