drbd_tracing.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. drbd_tracing.h
  3. This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
  4. Copyright (C) 2003-2008, LINBIT Information Technologies GmbH.
  5. Copyright (C) 2003-2008, Philipp Reisner <philipp.reisner@linbit.com>.
  6. Copyright (C) 2003-2008, Lars Ellenberg <lars.ellenberg@linbit.com>.
  7. drbd is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2, or (at your option)
  10. any later version.
  11. drbd is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with drbd; see the file COPYING. If not, write to
  17. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19. #ifndef DRBD_TRACING_H
  20. #define DRBD_TRACING_H
  21. #include <linux/tracepoint.h>
  22. #include "drbd_int.h"
  23. #include "drbd_req.h"
  24. enum {
  25. TRACE_LVL_ALWAYS = 0,
  26. TRACE_LVL_SUMMARY,
  27. TRACE_LVL_METRICS,
  28. TRACE_LVL_ALL,
  29. TRACE_LVL_MAX
  30. };
  31. DECLARE_TRACE(drbd_unplug,
  32. TP_PROTO(struct drbd_conf *mdev, char* msg),
  33. TP_ARGS(mdev, msg));
  34. DECLARE_TRACE(drbd_uuid,
  35. TP_PROTO(struct drbd_conf *mdev, enum drbd_uuid_index index),
  36. TP_ARGS(mdev, index));
  37. DECLARE_TRACE(drbd_ee,
  38. TP_PROTO(struct drbd_conf *mdev, struct drbd_epoch_entry *e, char* msg),
  39. TP_ARGS(mdev, e, msg));
  40. DECLARE_TRACE(drbd_md_io,
  41. TP_PROTO(struct drbd_conf *mdev, int rw, struct drbd_backing_dev *bdev),
  42. TP_ARGS(mdev, rw, bdev));
  43. DECLARE_TRACE(drbd_epoch,
  44. TP_PROTO(struct drbd_conf *mdev, struct drbd_epoch *epoch, enum epoch_event ev),
  45. TP_ARGS(mdev, epoch, ev));
  46. DECLARE_TRACE(drbd_netlink,
  47. TP_PROTO(void *data, int is_req),
  48. TP_ARGS(data, is_req));
  49. DECLARE_TRACE(drbd_actlog,
  50. TP_PROTO(struct drbd_conf *mdev, sector_t sector, char* msg),
  51. TP_ARGS(mdev, sector, msg));
  52. DECLARE_TRACE(drbd_bio,
  53. TP_PROTO(struct drbd_conf *mdev, const char *pfx, struct bio *bio, int complete,
  54. struct drbd_request *r),
  55. TP_ARGS(mdev, pfx, bio, complete, r));
  56. DECLARE_TRACE(drbd_req,
  57. TP_PROTO(struct drbd_request *req, enum drbd_req_event what, char *msg),
  58. TP_ARGS(req, what, msg));
  59. DECLARE_TRACE(drbd_packet,
  60. TP_PROTO(struct drbd_conf *mdev, struct socket *sock,
  61. int recv, union p_polymorph *p, char *file, int line),
  62. TP_ARGS(mdev, sock, recv, p, file, line));
  63. DECLARE_TRACE(_drbd_resync,
  64. TP_PROTO(struct drbd_conf *mdev, int level, const char *fmt, va_list args),
  65. TP_ARGS(mdev, level, fmt, args));
  66. #endif