~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/include/llvm/ExecutionEngine/JITEventListener.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===- JITEventListener.h - Exposes events from JIT compilation -*- C++ -*-===//
 
2
//
 
3
//                     The LLVM Compiler Infrastructure
 
4
//
 
5
// This file is distributed under the University of Illinois Open Source
 
6
// License. See LICENSE.TXT for details.
 
7
//
 
8
//===----------------------------------------------------------------------===//
 
9
//
 
10
// This file defines the JITEventListener interface, which lets users get
 
11
// callbacks when significant events happen during the JIT compilation process.
 
12
//
 
13
//===----------------------------------------------------------------------===//
 
14
 
 
15
#ifndef LLVM_EXECUTION_ENGINE_JIT_EVENTLISTENER_H
 
16
#define LLVM_EXECUTION_ENGINE_JIT_EVENTLISTENER_H
 
17
 
 
18
#include "llvm/System/DataTypes.h"
 
19
#include "llvm/Support/DebugLoc.h"
 
20
 
 
21
#include <vector>
 
22
 
 
23
namespace llvm {
 
24
class Function;
 
25
class MachineFunction;
 
26
 
 
27
/// Empty for now, but this object will contain all details about the
 
28
/// generated machine code that a Listener might care about.
 
29
struct JITEvent_EmittedFunctionDetails {
 
30
  const MachineFunction *MF;
 
31
 
 
32
  struct LineStart {
 
33
    // The address at which the current line changes.
 
34
    uintptr_t Address;
 
35
    // The new location information.  These can be translated to
 
36
    // DebugLocTuples using MF->getDebugLocTuple().
 
37
    DebugLoc Loc;
 
38
  };
 
39
  // This holds line boundary information sorted by address.
 
40
  std::vector<LineStart> LineStarts;
 
41
};
 
42
 
 
43
/// JITEventListener - This interface is used by the JIT to notify clients about
 
44
/// significant events during compilation.  For example, we could have
 
45
/// implementations for profilers and debuggers that need to know where
 
46
/// functions have been emitted.
 
47
///
 
48
/// Each method defaults to doing nothing, so you only need to override the ones
 
49
/// you care about.
 
50
class JITEventListener {
 
51
public:
 
52
  JITEventListener() {}
 
53
  virtual ~JITEventListener();  // Defined in JIT.cpp.
 
54
 
 
55
  typedef JITEvent_EmittedFunctionDetails EmittedFunctionDetails;
 
56
  /// NotifyFunctionEmitted - Called after a function has been successfully
 
57
  /// emitted to memory.  The function still has its MachineFunction attached,
 
58
  /// if you should happen to need that.
 
59
  virtual void NotifyFunctionEmitted(const Function &F,
 
60
                                     void *Code, size_t Size,
 
61
                                     const EmittedFunctionDetails &Details) {}
 
62
 
 
63
  /// NotifyFreeingMachineCode - This is called inside of
 
64
  /// freeMachineCodeForFunction(), after the global mapping is removed, but
 
65
  /// before the machine code is returned to the allocator.  OldPtr is the
 
66
  /// address of the machine code and will be the same as the Code parameter to
 
67
  /// a previous NotifyFunctionEmitted call.  The Function passed to
 
68
  /// NotifyFunctionEmitted may have been destroyed by the time of the matching
 
69
  /// NotifyFreeingMachineCode call.
 
70
  virtual void NotifyFreeingMachineCode(void *OldPtr) {}
 
71
};
 
72
 
 
73
// This returns NULL if support isn't available.
 
74
JITEventListener *createOProfileJITEventListener();
 
75
 
 
76
} // end namespace llvm.
 
77
 
 
78
#endif