Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

usdt_tracepoints_i386.s 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Copyright (c) 2012, Chris Andrews. All rights reserved.
  3. */
  4. /*
  5. * Stub functions containing DTrace tracepoints for probes and
  6. * is-enabled probes. These functions are copied for each probe
  7. * dynamically created.
  8. *
  9. */
  10. .text
  11. .align 4, 0x90
  12. .globl usdt_tracepoint_isenabled
  13. .globl _usdt_tracepoint_isenabled
  14. .globl usdt_tracepoint_probe
  15. .globl _usdt_tracepoint_probe
  16. .globl usdt_tracepoint_end
  17. .globl _usdt_tracepoint_end
  18. .globl usdt_probe_args
  19. .globl _usdt_probe_args
  20. usdt_tracepoint_isenabled:
  21. _usdt_tracepoint_isenabled:
  22. pushl %ebp
  23. movl %esp, %ebp
  24. subl $8, %esp
  25. xorl %eax, %eax
  26. nop
  27. nop
  28. leave
  29. ret
  30. usdt_tracepoint_probe:
  31. _usdt_tracepoint_probe:
  32. nop
  33. nop
  34. nop
  35. nop
  36. nop
  37. addl $0x20,%esp
  38. leave
  39. usdt_tracepoint_end:
  40. _usdt_tracepoint_end:
  41. ret
  42. /*
  43. * Probe argument marshalling, i386 style
  44. *
  45. */
  46. usdt_probe_args:
  47. _usdt_probe_args:
  48. pushl %ebp
  49. movl %esp,%ebp
  50. subl $8,%esp
  51. subl $8,%esp
  52. movl 8(%ebp),%edx
  53. movl 0xc(%ebp),%ecx
  54. test %ecx,%ecx
  55. je fire
  56. args: movl %ecx,%eax
  57. sal $2,%eax
  58. subl $4,%eax
  59. addl 0x10(%ebp),%eax
  60. pushl (%eax)
  61. dec %ecx
  62. jne args
  63. fire: jmp *%edx