All of lore.kernel.org
 help / color / mirror / Atom feed
* Intel PT: Address filtering not working. (cc me)
@ 2016-10-13  1:11 Muhammad Usman Nadeem
  2016-10-17  6:50 ` Adrian Hunter
  0 siblings, 1 reply; 3+ messages in thread
From: Muhammad Usman Nadeem @ 2016-10-13  1:11 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 535 bytes --]

Usage: sudo perf record -e intel_pt//u --filter='filter 0x400000 /
0x1000 @./a.out' ./a.out 123

a.out is my program (for loop, call using function pointer and use of
longjump) and 123 is the argument.

Output: [ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 1.171 MB perf.data ]


Output contains mostly MTC packets and no TNT or TIP packets.

I am on the latest mainline version of kernel (b67be92) and perf
version perf version 4.8.gb67be9.

What could be the problem?
I am using it wrong?

Thanks

[-- Attachment #2: test.c --]
[-- Type: text/x-csrc, Size: 538 bytes --]

#include <iostream>
#include <setjmp.h>
jmp_buf go;
int foo()
{
    return 5;
}
int bar()
{
	longjmp(go,1);
    return 6;
}

int main(int argc, char* argv[])
{
	bool jumped = false;
	int (*ptr) ();
	// if arg then long jump
    if (argc != 2) 
    {
    	ptr = foo;
    } else {
	    ptr = bar;
    }

    for (int i = 0; i < 50000000; ++i)
    {
        ++i;
        --i;
    }
    setjmp(go);

    if (!jumped)
    {
    	jumped = true;
	    ptr();
    } else {
	    std::cout <<  "AFTER long jump." << std::endl; 
    }
    return 0;
}

[-- Attachment #3: a.out --]
[-- Type: application/octet-stream, Size: 9408 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-17 23:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-13  1:11 Intel PT: Address filtering not working. (cc me) Muhammad Usman Nadeem
2016-10-17  6:50 ` Adrian Hunter
2016-10-17 23:12   ` Muhammad Usman Nadeem

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.