Manuel Selva
email: manuel.selva@lirmm.fr

Lionel Morel

Kevin Marquet

numap: A Portable Library For Low Level Memory Profiling

Keywords: NUMA, Non-Uniform Access, Memory Profiling, Memory Accesses Sampling, Portable library Accés mémoire non uniforme, Profilage mémoire, Echantillonage accés mémoire, Bibliothèque logicielle portable

The memory subsystem of modern multi-core architectures is becoming more and more complex with the increasing number of cores integrated in a single computer. This complexity leads to profiling needs to let software developers understand how programs use the memory subsystem. Modern processors come with hardware profiling features to help building tools for these profiling needs. Regarding memory profiling, many processors provide means to monitor memory traffic and to sample read and write memory accesses. Unfortunately, these hardware profiling mechanisms are often very complex to use and are specific to each micro-architecture. In this report, we present numap, a library dedicated to the profiling of the memory subsytem of modern multi-core architectures. numap is portable across many micro-architectures and comes with a clean application programming interface allowing to easily build profiling tools on top of it.

Introduction

The increasing number of cores sharing memory in a single computer system leads to the so-called memory wall. The memory subsystem can not satisfy the simultaneous requests of all the cores and thus becomes a serious performance bottleneck. To alleviate this issue, computer architects have proposed many changes to memory architectures [START_REF] Molka | Cache coherence protocol and memory performance of the intel haswell-ep architecture[END_REF]. In particular, new cache levels have been added to centralized shared memory architectures and new distributed shared memory architectures, also known as Non Uniform Memory Access (NUMA) architectures, have been designed. However these hardware innovations have increased the burden on the software for getting the best possible performance out of the hardware [START_REF] Blagodurov | A case for numa-aware contention management on multicore systems[END_REF][START_REF] Lepers | Thread and memory placement on numa systems: Asymmetry matters[END_REF]. In other words, the software must be aware of the underlying memory organization to efficiently exploit these complex memory architectures. Nevertheless, statically knowing the memory architecture details is not enough to exploit it efficiently. In particular, the dynamism of modern operating systems and applications leads to a form of non-determinism regarding the memory hierarchy usage. As a consequence, software developers need runtime profiling mechanisms to deeply understand how the software interacts with the memory and to identify memory bottlenecks. To allow the lowlevel performance measurement needed by the software, modern processors now provide hardware profiling mechanisms often referred to as Performance Monitoring Unit (PMU). Intel, AMD and ARM all include a PMU in their processors.

As far as memory is concerned, PMUs usually allow for two modes of operation. A first mode permits to count the number of memory requests that reach the memory controllers. From this count, one can monitor the memory bandwidth. A second mode, named sampling, periodically records samples that can contain more information about the initiator of the memory request (typically address of the instruction that initiates the request), the level into the memory hierarchy where the data was found and information about the latency of the access.

Unfortunately, using these profiling mechanisms is a daunting task because of low-level concerns. In particular, it requires writing micro-architecture dependent code to assign the correct model specific registers (MSR) with the correct configuration values. This code can be different even for different micro-architectures from the same processor vendor.

From the programming point of view, the increasing complexity of hardware platforms has led to the emergence of numerous parallel programming models. Custom profiling tools are then needed, that ought to be aware of the way the application is written. In order to provide useful performance information to the application developer, low-level profiling events should be linked to the programming model. An abstraction of the memory profiling capabilities of the hardware is thus required as a basic building block of these high-level profiling tools. This will allow to isolate and alleviate the difficult task of using the PMU from the other difficult task of correlating performance samples with programming models. Several existing works provide programming abstractions on top of the PMUs, but none of them handle the sampling of memory requests. Moreover, none of these approaches propose a portable way of monitoring memory bandwidth using the PMU in counting mode.

The main contribution of this work is the numap low-level memory profiling library. numap stands for Non Uniform Memory Access architectures Profiling. numap abstracts the common memory profiling mechanisms exposed to software by processors from different vendors by providing a powerful yet simple interface. It is an open source library1 that already supports many micro-architectures from Intel. numap has been initially thought and designed for profiling memory usage on NUMA architectures but it can definitely be used for memory profiling in centralized shared memory systems.

The remainder of the paper is organized as follows. We describe in Section to use them. In Section 3 we present related works. We then motivate the proposal of the numap library in Section 4. Section 5 gives the details of the library interface and implementation while Section 6 presents an example of using the library for profiling programs written in a highlevel dataflow parallel programming model. Finally, we conclude and describe future works in Section 7.

Background

In this section we first describe the different features provided by PMUs. Then we present existing solutions to access these features.

Performance Monitoring Unit

A PMU provides means to characterize hardware usage through hardware performance counters. These counters can be configured by software to count some specific hardware events among a huge number of possibilities. As shown in fig. 1, counters are either located at the level of cores or at the level of memory controllers. At core level, examples of hardware events that can be profiled are clock cycles, number of floating point instructions, number of level 1 cache misses or number of branch mispredictions. At memory level, counters can be configured to count the exact number of memory read or memory write requests.

In addition to this counting mode, most PMUs provide a sampling mode for events at core level. Intel's technique for sampling is called Precise Event-Based Sampling (PEBS) [START_REF]Intel ® 64 and IA-32 Architectures Software Developer's Manual[END_REF] and AMD's is called Instruction-based Sampling (IBS) [START_REF] Paul | Instruction-based sampling: A new performance analysis technique for amd family 10h processors[END_REF]. On Intel platforms, when sampling, instead of counting the occurrences of a specific event, the PMU is configured to generate a sample with detailed information every time the event occurred a specified number of times. On AMD platforms, IBS allows sampling all instructions independently for a particular event. On both Intel and AMD platforms, information that can be recorded in samples includes the address of the instruction that has generated the event and, in the case of memory-related events, the targeted memory address, the memory level that served the memory access and latency of the memory access. From this information, one can associate low-level information about memory accesses to source code.

Performance Monitoring Unit Usage

Using hardware monitoring counters requires a deep understanding of the processor's architecture and requires to write very low-level code. On Intel and AMD architectures, the PMU is accessed through Model Specific Registers (MSR) that can be written in processor's supervisor mode only.

Figure 2 illustrates various ways to access these registers. First, performance counters can be manually programmed by writing assembly code executed in supervisor mode on bare metal (left part of fig. 2). Second, using Linux, a kernel module can be used, such as the /dev/cpu/msr standard module. This module only allows to access the PMU configuration registers in supervisor mode, it does not provide any abstraction.

Lastly, the perf_event_open system call can be used. It was introduced to support the Linux perf command line profiler [pera], and provides a first level of abstraction to access hardware performance counters. This system call abstracts the need to manually write bits to MSRs to start and stop hardware profiling. Nevertheless, much work is still required from the developer willing to profile his/her applications.

The main difficulties consist in finding which events to count or to sample, setting-up all the parameters to be passed to the system call, and performing several system calls depending on the number of threads of the profiled application and the number of cores of the hardware. The PMU events to be used are obviously different across processor vendors, but they are also different between micro-architectures from the same vendor. Finding them requires to step into the specific documentation for the targeted micro-architecture and to understand the low-level details of the underlying hardware. This task is daunting and time consuming.

Another difficulty lies in understanding how to use the system perf_event_open system call. To support this claim it is worth mentioning that the corresponding man page2 is 1583 lines long. Figure 3 shows the signature of the main system call. Quoting the man page, "the pid and cpu arguments allow specifying which process and CPU to monitor. The group_fd argument allows event groups to be created ". Note that the pid argument is not a process id but a thread id. The flags argument is mainly used to associate a new event to an existing group. Finally, and quoting the man page again, the attr structure argument provides "detailed configuration information for the event being created". This structure contains all the hardwaredependent information, in the form of raw numbers, the meaning of which depends on the microarchitecture. The system call returns a file descriptor to be used for reading count values or access int perf_event_open(struct perf_event_attr * attr, pid_t pid, int cpu, int group_fd, unsigned long flags); recorded samples. When sampling is required, the user code that calls perf_event_open must use the returned file descriptor to allocate memory where the kernel will record samples. When this allocated memory is full, the kernel can't record samples anymore until user code indicates which samples it has already read. Section 4 shows in detail the complexity of using perf_event_open to sample memory reads on a particular Intel micro-architecture.

To hide etheir the complexity of perf_event_open or the one of using directly the msr kernel module, libraries such as PAPI [DLM + 01] and Intel Performance Counter Monitor (PCM) [PCM] have been proposed. Their main goal, as demonstrated in the next section, is to provide abstractions for common profiling mechanisms based on the PMU but, as far as the authors know, they do not provide abstractions for memory sampling nor a portable way of monitoring memory bandwidth.

Related Work

This section first focuses on work regarding how to use the PMU. We then review existing profiling tools that use memory sampling capabilities.

Libraries For Accessing PMUs

As stated in the previous section, the Linux kernel provides the perf_event_open [perb] system call for accessing the PMU of the underlying hardware. Because Linux supports many different processors with a PMU, kernel developers had to leave the burden of a lot of low level micro-architecture dependent details on the user code. As a consequence, this system call is very complex to use, and can't be used in a portable way. Intel PCM [PCM] library is another way to access the PMU. It is available for both Linux and Windows. Nevertheless, it doesn't provide access to memory sampling features and works only for Intel processors as the name suggests. PAPI [DLM + 01] is an API aiming at simplifying the use of PMUs of different architectures. PAPI provides an abstraction for the common counters found on all the targeted architectures in such a way that the programmer only needs to say, e.g. "I want to count the number of instructions retired ". Unfortunately, as Intel PCM, the current PAPI version 3 (5.4.3) doesn't provide any way to use the memory sampling capabilities of modern PMUs. Moreover, counting memory requests using PAPI requires to know which hardware event to use for every targeted micro-architecture. A work proposing the addition of sampling capabilities in PAPI has been published very recently [START_REF] Lopez | A prototype sampling interface for papi[END_REF]. The main difference between this work and our proposed numap library concerns the interface exposed to user code. We advocate for a higher level of abstraction to let developers using numap focus only on analyzing the data and not on how to 3 http://icl.cs.utk.edu/papi Inria get the memory samples. Moreover, to the best of our knowledge, this PAPI extension is not open source and its official integration into PAPI is not planned yet.

Profilers And Runtimes Using Memory Sampling

We now review existing profiling and runtime software approaches that are based on memory sampling capabilities. These tools are either non portable or require very expensive work to support different micro architectures. All of them, except the Linux perf profiler, could benefit from numap to ease their development and to increase their portability.

The Linux perf [pera] command line profiler provides a memory sampling feature. It is portable on all the processors supported by Linux. perf is based on the perf_event_open system call and hardware dependent code is developed by Linux kernel developers for supporting various models. It is a very complex tool designed to be used by end users. The only provided interface is the command line, no API is provided. As a consequence, compared to numap, it is impossible to build programming model aware profilers on top of perf.

Memphis [START_REF] Mccurdy | Memphis: Finding and fixing numa-related performance problems on multi-core platforms[END_REF] and MemProf [START_REF] Lachaize | Memprof: A memory profiler for numa multicore systems[END_REF] are memory profilers dedicated to identify remote memory accesses in concurrent applications running on NUMA architectures. These tools work only for AMD processors and required the development of a specific Linux Kernel module dedicated to memory sampling on AMD processors based on IBS [START_REF] Paul | Instruction-based sampling: A new performance analysis technique for amd family 10h processors[END_REF]. Carrefour [DFF + 13] is a runtime extension of MemProf integrated into the Linux kernel memory management subsystem. Its main goal is to limit remote memory accesses on NUMA architectures and to alleviate memory load imbalance. As MemProf, Carrefour required expensive developments only for running on AMD processors. HPCToolkit is a profiler that has been recently extended to support memory profiling [START_REF] Liu | A tool to analyze the performance of multithreaded programs on numa architectures[END_REF]. These extensions were required to identify memory bottlenecks in parallel applications. This profiler is portable on different micro architectures. It relies on PAPI for the profiling aspects not related to memory and relies on micro architecture dependent code for memory sampling. ScaAnalyzer [START_REF] Liu | Scaanalyzer: A tool to identify memory scalability bottlenecks in parallel programs[END_REF] is another extension to HPCToolkit allowing to detect memory scalability bottlenecks. It also relies heavily on memory sampling, and required a lot of development to support different micro-architectures. The development of all these tools could be easier using the numap library.

Motivation

None of the existing PMU libraries provide high-level abstractions for memory sampling. More specifically, they don't provide any abstraction for techniques like Intel Precise Event-Based Sampling (PEBS) [START_REF]Intel ® 64 and IA-32 Architectures Software Developer's Manual[END_REF] and AMD Instruction-Based Sampling (IBS) [START_REF] Paul | Instruction-based sampling: A new performance analysis technique for amd family 10h processors[END_REF]. Developers willing to analyze memory usage and performance thus have to use the perf_event_open system call or MSRs to setup memory profiling. Again, using any of these two solutions requires to find which event to profile in the documentation of the targeted processor and to write a lot of setup code. We now describe step by step the burden of doing memory sampling using perf_event_open.

Once a developer knows which event he/she needs to use for memory sampling using perf_event_open, the first thing to do is to setup the parameters and then to effectively make the call using these parameters. Figure 4 illustrates the burden for this task.

Line 3 specifies the event that must be recorded for the Intel Westmere micro-architecture in this case. These events are part of the several hundreds of events documented in processors' datasheets (Intel's Software Developer Manual [START_REF]Intel ® 64 and IA-32 Architectures Software Developer's Manual[END_REF] chapter 18 for Intel processors). Line 4 specifies that a sample must be recorded only if the latency of the read access is above 3 cycles (which is the minimal latency for a memory load on the considered Westmere platform). Then, line 5 indicates the rate at which sampling must occur. This rate is in number of events. In this example, we record a sample every 20000 memory loads. In practice, the sampling rate will depend on the hardware cost of sampling memory accesses and on the acceptable overhead. The acceptable overhead for profiling tools dedicated to offline analyzes should be greater than the one for runtime decisions based on memory sampling. Lines 6 to 8 indicate which information must be recorded in each sample. Lines from 9 to 14 configure other details about the memory sampling. In these lines we indicate that we want precise recording of the instruction address, that we want to record mmap information for offline symbol decoding and that we exclude kernel and hypervisor code from sampling. Line 17 finally performs the system call and we get a file descriptor as a result. In this example, the kernel is told to record samples only for the Linux thread with the given TID identifier.

Once the perf_event_open call has been issued, user code must map the memory containing the records in its address space. User code must also effectively start the sampling using another system call, namely ioctl. Figure 5 shows how to do these two tasks. The mmap system call must be used with the file descriptor previously returned by perf_event_open with a particular size and with the appropriate protection arguments. As shown on line 6, the size of the mapped memory area must be in the form 1 + 2 n pages where pages is the system default page size. Finally, the ioctl call should be made twice with two specific perf flags to first reset and then start the sampling (lines 10 and 11).

When user code wants to stop sampling, an ioctl call must be performed (symmetric to the one to start sampling) as shown on line 4 of fig. 6.

To analyze the samples, extra precautions should also be taken as shown by lines 7 to 19 in fig. 6. First (line 7) we must get the position of the last sample written by the kernel to know when we have to stop reading the samples. Then, a memory barrier instruction should be issued (line 8) as specified in the perf_event_open man page ("On SMP-capable platforms, after reading the data_head value, user space should issue an rmb()"). Lines 9 and 10 get the address of the header of the first sample. From then on, we can iterate over samples whose body is located at address header + 8 as shown by lines 12 to 19.

The Library

We propose the numap library to alleviate developers from knowing which exact hardware events need to be used for monitoring memory bandwidth and sampling memory requests. numap also remove most of the burden described in the previous section when using perf_event_open. By automatically choosing the correct event for the underlying hardware, numap provides a portable support for low level memory profiling.

Application Programming Interface

The main functions of the numap Application Programming Interface (API) are shown on fig. 7. These functions count memory requests, generate memory samples and provide access to them for analyzing memory behavior of applications.

Because numap relies on specific hardware components and operating system configurations, it can sometimes be complex just to know whether or not memory sampling is available on particular machine. To alleviate this problem, all the numap functions return an integer for error management. From this error code, user code can get a human readable message using the error_message function. The message may indicate that the micro-architecture doesn't provide memory sampling, that numap doesn't support yet the micro-architecture or that the system policy doesn't allow memory sampling (along with information about how to enable it).

All functions except the error management, take a custom structure as a parameter that is used both to provide results to the caller and to internally keep track of the events that have been activated. There is one structure for functions related to sampling and another one for functions related to counting. The definitions of these structures are shown on fig. 8.

Regarding sampling, this structure is called samp_session. It contains a list of thread ids. User code must fill this list to specify the threads to be profiled before passing the structure to functions starting profiling. The samp_session structure is also used to specify the sampling rate and the number of pages to allocate for saving the samples (this number is used to compute the size in the correct form which is then passed to the mmap call described in the previous section). The current version of numap only allows to save samples until the specified size is filled. As stated in Section 7, we plan to allow the profiling of very long lived applications. The init_samp_session function is provided to setup all the input parameters at once.

The samp_read_start and samp_write_start functions internally performs the mmap system call described in the previous section. There may be several calls in case the user code specifies several threads to be profiled. The result of each of them is stored in the metadatas list of the samp_session object passed as parameter.

Finally, the samp_session structure contains internal fields that should only be read and written by numap itself. These fields are needed to handle all the details described in Section 4.

For counting, the structure is called count_session. It contains the list of NUMA nodes to be profiled. As for sampling, user code must fill this list to specify the nodes to be profiled. The structure also contains a file descriptor for each profiled NUMA node. When counting has been stopped, user code gets the actual count value by calling the get_count function using this file descriptor.

As shown in fig. 7, numap provides functions to start and stop profiling both for sampling and counting. In both modes, numap differentiates memory read and memory write profiling. The reason for that is the hardware, PMUs provide different events for read and write profiling.

The counting functions are used to start counting

The second type of functions provided by numap are used to let user code easily access the samples generated by the library. All these functions take as input the samp_session Inria structure to avoid the user code having to deal with low level details. The library provides functions allowing to print the samples generated by numap either in a file or on the console.

To perform custom work on the generated samples, numap provides the samp_cpy function. This function produces a ready-to-use list of simple sample objects. This list is then accessible through the dest pointer. This list is dynamically allocated on the heap by numap, and its size is returned to user code through the nb_sp parameter. Each element of this list is of type struct samp. As shown on fig. 8, this structure contains the address of the instruction that generated the sample, the targeted address, the latency of the access (weight) and the memory level that served it. These values are the fundamental information needed to build appropriate profiling or runtime mechanisms such as the one described in Sections 3.2 and 6. This samp_cpy function alleviates the user code from the details described in the previous section required to read the memory filled by the kernel.

Figure 9 summarizes the usage of numap for sampling read memory accesses. User code must first call the init_samp_session function (line 3) and specify the identifiers of the threads to be profiled (line 8). In this example we are profiling only the current thread whose identifier is retrieved through the syscall(SYS_gettid) call. Then, sampling is started just before the code to be profiled with samp_read_start (line 11) and stopped with samp_read_stop when needed (line 20). At this point the samples are available for use. Figure 9 only prints them on standard output using the numap built-in print_rd function (line 28). A real life usage of numap will deeply analyze the samples either using samp_cpy, or directly accessing the s.metadatas. This example also shows the usage of the error_message function (lines 5, 13 and 22).

Implementation

The implementation of numap relies on the classic perf_event_open usage such as described in Section 4. Indeed, the main goal of numap is to provide an abstraction on top of the Linux kernel to allow both portability and usability. Usability is handled through the simple interface described in the previous section.

Regarding portability, numap implementation automatically selects the correct hardware event to be used for memory read or write sampling and for memory requests counting. The set of supported micro-architectures is coded as a list of structures tagged by processor and family identifiers. For each micro-architecture, the structure contains the identifier of the events to be used with perf_event_open. This identifiers are not directly the integer representation of the events to be passed to perf_event_open but a string representation. This string is feed to the pfm library [PFM] which purpose is only to convert a string event to a number usable by perf_event_open. To find the string identifiers of the events to be used for each supported Intel micro-architecture, we used the software developer manual chapter 18 [START_REF]Intel ® 64 and IA-32 Architectures Software Developer's Manual[END_REF]. Navigating through this document is really difficult for newcomers. It requires both having a clear overview of the history of Intel micro-architectures and a lot of time to find the particular event among all the events provided (often several hundreds). The micro-architectures currently supported are shown on Table 1. As shown in this table, write accesses sampling has been introduced by Intel with the Sandy Bridge family. All these micro-architectures support counting of memory requests.

The implementation of numap hides as much as possible the details described in Section 4. Calls to perf_event_open, mmap, ioctl and memory barriers are used internally by the implementation of the numap functions. perf_event_open calls are done by the samp_xxx_start and count_xxx_start (xxx is either read or write) functions. For sampling, the starting functions also perform the mmap call. The ioctl calls needed to start profiling are also done by the

Library Usage Example

numap was initiated as a mean for memory profiling of dataflow applications executed on NUMA architectures [START_REF] Selva | Performance Monitoring of Throughput Constrained Dataflow Programs Executed On Shared-Memory Multi-core Architectures[END_REF]. It started as an ad-hoc tool to evolve to a clean API to be used outside its initial scope. This section shows how we use numap to build a memory profiler dedicated to dataflow applications.

Dataflow Programming

In the dataflow programming model, an application is described as a graph. Each node of the graph, called an actor, represents an independent computing unit operating on input data to produce output data. Edges between actors specify the data dependencies between them and are the only mean for actors to communicate. More precisely, these edges behave as first-infirst-out (FIFO) channels. The independence between actors and the blocking-read semantics associated to channels allow the dataflow compiler and/or runtime to automatically distribute the computing work of actors among the available cores when targeting parallel hardware. We use numap to profile dataflow applications written using the RVC-CAL language compiled with the Open RVC-CAL Compiler (Orcc) [YLJ + 13]. This compiler is a source-to-source compiler producing C multi-threaded code to be compiled by GCC or LLVM Clang to produce the binary.

Profiling RVC-CAL Applications With numap

Understanding the memory performances of dataflow applications written in RVC-CAL is crucial to map the dataflow application on the hardware in an efficient way. numap allows to easily get memory samples for the dataflow application in a portable way.

Figure 10 shows the profiling toolchain we implemented inside Orcc. As presented on this figure, the Orcc compiler has been modified to include memory sampling mechanisms within the generated C code. Mainly, calls to numap start and stop sampling functions are inserted each time a thread is created. The generated C source code is then linked against numap. In this instrumented C source code, when a thread is stopped, the samples are recorded to a file for offline analysis. This offline analysis uses the information reported in each sample provided by numap in order to associate samples to channels and actors. This allows, typically, to determine the cost (in terms of latency) of an actor producing data tokens to a particular FIFO channel. This association is required to provide hints to the application programmer and the designer of the dataflow compiler. They can then modify and hopefully optimize either the application, the compiler or the dataflow runtime accordingly.

Using numap, the instrumentation of the Orcc compiler to perform low level memory profiling was straightforward. Only few calls to the library are required without the need to understand at all how the Linux perf_event_open system call is implemented and how the PMU gets the information. The numap user code (generated by the Orcc compiler in this case) just tells numap to perform memory read and/or memory write sampling for its own threads. Having a library such as numap also allows to perform very fine grain sampling, by allowing to start and stop profiling at any time.

Conclusion And Future Works

This work proposes the numap library to ease the usage of memory features proposed by the PMU of many modern processors. numap is both portable and easy to use. Portability is ensured by hiding micro-architectural dependent to user-code, while usability is provided by hiding all the burden to use the complex perf_event_open system call. We are successfully using numap as a basis of a memory profiler dedicated to dataflow applications [START_REF] Selva | Performance Monitoring of Throughput Constrained Dataflow Programs Executed On Shared-Memory Multi-core Architectures[END_REF]. We believe that such libraries are required to help the software community build portable profiling tools and runtime mechanisms in an efficient way.

Nevertheless, to increase the adoption of numap we are working on several directions. First, we are currently porting numap on AMD processors. This requires to understand the details of IBS [START_REF] Paul | Instruction-based sampling: A new performance analysis technique for amd family 10h processors[END_REF], the PMU memory sampling capabilities for AMD. This task will be nevertheless straightforward because perf_event_open already supports IBS[lwn], and because we gained deep experience of this system call while developing numap for Intel platforms. Independently Inria of the complexity of porting numap on AMD micro-architectures, it is worth mentioning that our API will stay the same, because the IBS mechanism provides all the sampling attributes of the numap samp structure and because it also requires a frequency input parameter.

Second, we are planning to add better support for the management of long lived applications. Indeed, numap currently only allows to save a maximum number of events specified at initialization time. To support applications willing to process samples while running, we will extend the API with functions to indicate to the library the part of the samples already read that can be erased. This information will then be propagated to the Linux kernel to let him recycle corresponding memory pages. To support applications only requiring offline analysis of the samples, the library will provide a mechanism to automatically dump the samples into a file. This mechanism will be toggled with a simple additional parameter to the initialization function of numap.

Last, we think that the features provided by numap can and should be integrated into other profiling tools. Among those, a preferred target would be the widely used PAPI [DLM + 01] library. In a near future, the best of both numap and the memory sampling abstraction API proposed in [START_REF] Lopez | A prototype sampling interface for papi[END_REF] should be integrated into the main version of PAPI.

Figure 3 :

 3 Figure 3: perf_event_open system call signature. Parameters specify what and when to count or to sample. The system call returns a file descriptor to be used for reading count value or access recorded samples.

1

  Figure4: perf_event_open system call complexity. This example shows how to sample memory loads for a single thread with id TID.

Inria 1 / 2 3Figure 6 :

 126 Figure5: Map in user space the result of perf_event_open system call and start sampling. There are constraints on the size of the mapped memory.

Figure 8 :

 8 Figure 8: The numap API data structures. The structure samp_session is used by user code to specify to numap what should be profiled and to get the result. The structure samp represents a single sample.

Figure 10 :

 10 Figure 10: RVC-CAL memory profiler based on numap. The Orcc compiler is modified to generate code including numap function calls. During the execution of the application, memory samples provided by numap are recorded for offline analysis.

  For Accessing PMUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.2 Profilers And Runtimes Using Memory Sampling . . . . . . . . . . . . . . . . . Programming Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 10 5.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 6 Library Usage Example 15 6.1 Dataflow Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 6.2 Profiling RVC-CAL Applications With numap . . . . . . . . . . . . . . . . . . . . 15 7 Conclusion And Future Works 16 RR n°8879 RESEARCH CENTRE GRENOBLE -RHÔNE-ALPES Inovallée 655 avenue de l'Europe Montbonnot 38334 Saint Ismier Cedex Publisher Inria Domaine de Voluceau -Rocquencourt BP 105 -78153 Le Chesnay Cedex inria.fr

  PMU on an Intel dual processors NUMA architecture. Some performance counters are located at Core level, and others at Uncore level. Uncore counters are not able to distinguish events according to the originated core.

	Core domain	Core 1 L1 L2 Xeon X5650 ... Core 6 L1 L2 PMU PMU	Core 7 L1 L2 Xeon X5650 ... Core 12 L1 L2 PMU PMU
	Uncore domain	L3 Mem. Ctrl Mem. 1 PMU	QPI	QPI	L3 Mem. Ctrl Mem. 2 PMU
	Figure 1:
					2 PMUs and how

Table 1 :

 1 Figure9: Basic usage of numap. User code must use the sequence init_samp_session, samp_read_start and samp_read_stop. Then user code exploits the resulting samples. In this example, they are only printed on standard output using the numap built-in print_rd function. Micro-architectures supported by numap starting functions and the ones to stop profiling by samp_xxx_stop and count_xxx_stop ones. The samp_cpy function manages the call to the memory barrier and the conversion from the raw results provided by the kernel to the list of struct samp elements.

	1 // Init read sampling
	2 struct samp_session s;
	3 res = init_samp_session(&s, 1, 1000, 64);
	4 if(res < 0) {
	5	printf(''err:%s\n'', error_message(res));
	6	return -1;
	7 }
	8 sm.tids[0] = syscall(SYS_gettid);
	9
	10 // Start memory read access sampling
	11 res = samp_read_start(&s);
	12 if(res < 0) {
	13	printf(''err:%s\n'', error_message(res));
	14	return -1;
	15 }
	16
	17 // Code to be profiled here
	18
	19 // Stop memory read access sampling
	20 res = samp_read_stop(&s);
	21 if(res < 0) {
	22	printf(''err:%s\n'', error_message(res));
	23	return -1;
	24 }
	25
	26 // Print memory read sampling results
	27 printf(''Memory read sampling results\n'');
	28 print_rd(stdout, &s);
		Inria

https://github.com/numap-library/numap RR n°8879

http://man7.org/linux/man-pages/man2/perf_event_open.2.html RR n°8879

RR n°8879


Bérard Bergery Blandine

Pierre Vallois

Iecn

Convergence at first and second order of some approximations of stochastic integrals

Keywords: stochastic integration by regularization, quadratic variation, first and second order convergence, stochastic Fubini's theorem 2000 MSC: 60F05, 60F17, 60G44, 60H05, 60J65

. First, we prove that the convergence in the a.s. sense exists when the integrand is Hölder continuous and the integrator is a continuous semimartingale. Second, we investigate the second order convergence in the Brownian motion case.

Introduction

We consider a complete probability space (Ω, F, F t , P ), which satisfies the usual hypotheses. The notation (ucp) will stand for the convergence in probability, uniformly on the compact sets in time.

1. Let X be a real continuous (F t )-semimartingale. In the usual stochastic calculus, the quadratic variation and the stochastic integral with respect to X play a central role. In [START_REF] Russo | The generalized covariation process and Itô formula[END_REF], [START_REF] Russo | Itô formula for C 1 -functions of semimartingales[END_REF] and [START_REF] Russo | Stochastic calculus with respect to continuous finite quadratic variation processes[END_REF], Russo and Vallois extended these notions to continuous processes. Let us briefly recall their main definitions. Definition 1.1 Let X be a real-valued continuous process, (F t )-adapted, and H be a locally integrable process. The forward integral t 0 Hd -X is defined as

t 0 Hd -X = lim →0 (ucp) 1 t 0 H u (X u+ -X u ) du,
if the limit exists. The quadratic variation is defined by

[X] t = lim →0 (ucp) 1 t 0 (X u+ -X u ) 2 du 1
if the limit exists.

In the article, X will stand for a real-valued continuous (F t )-semimartingale and (H t ) t 0 for an (F t )-progressively measurable process. If H is continuous, then, according to Proposition 1.1 of [START_REF] Russo | The generalized covariation process and Itô formula[END_REF], the limits in (1.1) exist and coincide with the usual objects. In order to work with adapted processes only, we change u + into (u + ) ∧ t in the above integrals. This change does not affect the limit (cf (3.3) of [START_REF] Russo | Elements of stochastic calculus via regularisation[END_REF]). Consequently,

t 0 H u dX u = lim →0 (ucp) 1 t 0 H u X (u+ )∧t -X u du, (1.1)
and

< X > t = lim →0 (ucp) 1 t 0 X (u+ )∧t -X u 2 du (1.2)
where t 0 H u dX u is the usual stochastic integral and < X > is the usual quadratic variation of X.

2. First, we determine sufficient conditions under which the convergences in (1.1) and (1.2) hold in the almost sure sense. Let us mention that some results in this direction have been obtained in [START_REF] Gradinaru | Approximation at first and second order of morder integrals of the fractional Brownian motion and of certain semimartingales[END_REF] and [START_REF] Karandikar | On almost sure convergence results in stochastic calculus[END_REF].

We say that a process Y is locally Hölder continuous if, for all T > 0, there exist α ∈]0, 1] and a finite (random) constant C Y such that

|Y s -Y u | C Y |u -s| α ∀u, s ∈ [0, T ], a.s. (1.3)
Our first result related to stochastic integral is the following.

Theorem 1.2 If (H t ) t 0 is adapted and locally Hölder continuous, then

lim →0 1 t 0 H u (X (u+ )∧t -X u )du = t 0 H u dX u , (1.4)
in the sense of almost sure convergence, uniformly on the compact sets in time.

Our assumption related to (H t ) is simple but too strong as shows item 1 of Theorem 1.7 below. In [START_REF] Karandikar | On almost sure convergence results in stochastic calculus[END_REF], a general result of a.s. convergence of sequences of stochastic integrals has been given. However it cannot be applied to obtain (1.4) (see Remark 2.3).

We now consider the convergence of -integrals to the bracket of X.

Proposition 1.3 If X is locally Hölder continuous, then

lim →0 1 t 0 (X (u+ )∧t -X u ) 2 du =< X > t , (1.5)
in the sense of almost sure convergence, uniformly on the compact sets in time. Moreover, if K is a continuous process,

lim →0 1 t 0 K u (X (u+ )∧t -X u ) 2 du = t 0 K u d < X > u , (1.6)
in the sense of almost sure convergence.

3. Under the assumptions given in Theorem 1.2, we have an approximation scheme of • 0 H s dX s which converges a.s. According to Remark 2.1, the (a.s.) rate of convergence of is of order α , when X has a finite variation and H is α-Hölder continuous. Therefore, it remains to determine the rate of convergence when X is a local martingale. This leads to introduce

∆ (H, t) = 1 √ 1 t 0 H u (X (u+ )∧t -X u )du - t 0 H u dX u , t ≥ 0 (1.7)
where H is a progressively measurable and locally bounded process.

In order to study the limit in distribution of the family of processes ∆ (H, t), t ≥ 0 as → 0, a two-steps strategy has been adopted. First, we consider the case where X = H = B and B denotes the standard Brownian motion. Second, using a functional theorem of convergence we determine the limit of ∆ (H, t), t ≥ 0 . Note that in [START_REF] Gradinaru | Approximation at first and second order of morder integrals of the fractional Brownian motion and of certain semimartingales[END_REF], some related results have been proven.

a) Suppose that X = H = B. In that case, using stochastic Fubini's theorem (cf relation (4.8) with Φ = 1) we have:

∆ (B, t) = -W (t) + R 1 (B, t),
where

W (t) = t 0 G (u)dB u , G (u) = 1 √ u (u-) + (B u -B s )ds, (1.8)
and

R 1 (B, t) := 1 √ t∧ 0 s -1 B s dB s .
From Lemma 4.4, the process R 1 (B, •) does not contribute to the limit since

R 1 (B, •) (ucp)
→ 0, as → 0. Therefore, the convergence of ∆ (B, •) reduces to the one of W . We determine, more generally, in Theorem 1.4 below the limit of the pair W , B . Theorem 1.4 (W (t), B t ) t 0 converges in distribution to (σW t , B t ) t 0 , as → 0, where W is a standard Brownian motion, independent from B, and σ 2 = 1 3 . b) We now investigate the convergence of (∆ (H, t)) t 0 . We restrict ourselves to processes H of the type As for X, we assume that it is a Brownian martingale with representation :

H t = H 0 + M t + V t where 1. H 0 is F 0 -measurable,
X t = t 0 Φ(u)dB u , t ≥ 0 (1.9)
where (Φ(u)) is predictable, locally bounded and right-continuous at 0.

From now on, (W t ) denote a standard Brownian motion independent from (B t ),

and σ := 1 √ 3 .
Using functional results of convergence (Proposition 3.2 and Theorem 5.1 in [START_REF] Jakubowski | Convergence en loi des suites d'intégrales stochastiques sur l'espace D 1 de Skorokhod[END_REF]) and Theorem 1.4, we obtain the following result.

Theorem 1.5 1. For any 0 < t 1 < • • • < t n , the random vector (∆ (H 0 , t 1 ), . . . , ∆ (H 0 , t n )) converges in law to σH 0 Φ(0) N 0 , • • • , N 0 , where N 0 is a standard Gaussian r.v, independent from F 0 .

2. If V is a process which is locally Hölder continuous of order α > 1 2 , then ∆ (V, t) converges to 0 in the ucp sense as → 0.

If

M t = t 0 Λ s dB s , then the process (∆ (M, t)) t 0 converges in distribu- tion to (σ t 0 Λ u Φ(u)dW u ) t 0 as → 0. 4. If H 0 = 0, M and V are as in points (2) -(3) above, then (∆ (M + V, t)) t 0 converges in law to (σ t 0 Λ u Φ(u)dW u ) t 0 as → 0.
Let us discuss the assumptions of Theorem 1.5. As for item 2, the conclusion is false if α ≤ 1/2. Indeed, if we take V t = B t then, t → V t is α-Hölder with α < 1/2, however, as shows Theorem 1.

H t = h1I {t=0} + i 0 h i 1I {t∈]a i ,a i+1 ]} .
1. Suppose that X is continuous, then,

1 t 0 H s (X (s+ )∧t -X s )ds converges
almost surely to t 0 H s dX s , uniformly on the compact sets in time, as → 0.

2. Suppose h = 0 and X is defined by (1.9). Associated with a sequence (N i ) i∈N of i.i.d. r.v's with Gaussian law N (0, 1), independent from B consider the piecewise and left-continuous process:

Z s := σ h 0 Φ(0)N 0 1 {0<s≤a 1 } + i≥1 (h i -h i-1 )Φ(a i )N i 1 {a i <s≤a i+1 } , s > 0 and Z 0 = 0.
Suppose that Φ is right-continuous at any point a i . Then, for any fixed

times 0 ≤ s 1 < • • • < s n , (B s , s ≥ 0), ∆ (H, s 1 ), • • • , ∆ (H, s n ) converges in law to (B s , s ≥ 0), Z s 1 , • • • , Z sn as → 0.
A weak version of Theorem 1.7 has been given in Section 6.3 of [START_REF] Bérard | Approximation du temps local et intégration par régularisation[END_REF].

Note that the family of processes ∆ (H, t), t ≥ 0 cannot converge in the Skorokhod space to a right continuous process Z 0 (t), t ≥ 0 . Indeed, according to Theorem 1.7, the map t ∈]0, a 1 [ → Z 0 (t) should be constant and not null. This contradicts the fact that Z 0 (0) = 0.

In [START_REF] Russo | The generalized covariation process and Itô formula[END_REF], convergence in distribution of sequences of stochastic integrals are considered. We discuss in Remark 4.2 the link between Rootzen's result and ours.

4.

Let us finally present our result of convergence in distribution related to the quadratic variation.

Let us consider

∆ (2) (K, t) = 1 √ 1 t 0 K u (B (u+ )∧t -B u ) 2 du - t 0 K u du , (1.11)
where(K s ) is locally bounded and progressively measurable.

Proposition 1.8 Let (K s ) be a predictable, right-continuous with left limits and locally bounded process. Then, (∆ (2) (K, t)) t 0 converges in distribution to

(2σ t 0 K u dW u ) t 0 , as → 0.
5. Let us briefly detail the organization of the paper. Section 2 contains the proofs of the almost convergence results, i.e. Theorem 1.2 and Proposition 1.3. Then, the proof of Theorem 1.4 (resp. Propositions 1.6, 1.8 and Theorems 1.5, 1.7) is (resp. are) given in Section 3 (resp. Section 4).

In the calculations, C will stand for a generic constant (random or not). We will use several times a stochastic version of Fubini's theorem, which can be found in Section IV.5 of [START_REF] Revuz | of Grundlehren der Mathematischen Wissenschaften[END_REF].

2 Proof of Theorem 1.2 and Proposition 1.3

We begin with the proof of Theorem 1.2 in Points 1-4 below. Then, we deduce Proposition 1.3 from Theorem 1.2 in Point 5.

1. Let T > 0. We suppose that (H t ) t 0 is locally Hölder continuous of order α and we study the almost sure convergence of

I (t) := 1 t 0 H u (X (u+ )∧t -X u )du to I(t) := t 0 H u dX u , as → 0, uniformly on t ∈ [0, T ].
By stopping, we can suppose that (X t ) 0 t T and < X > T are bounded by a constant.

Let X = X 0 + M + V be the canonical decomposition of X, where M is a continuous local martingale and V is an adapted process with finite variation. It is clear that I (t) -I(t) can be decomposed as

I (t) -I(t) = 1 t 0 H u (M (u+ )∧t -M u )du - t 0 H u dM u + 1 t 0 H u (V (u+ )∧t -V u )du - t 0 H u dV u .
Then, Theorem 1.2 will be proved as soon as I (t) -I(t) converges to 0, in the case where X is either a continuous local martingale or a continuous finite variation process.

We deal with the finite variation case in Point 2. As for the martingale case, the study is divided in two steps:

1. First, we prove that there is a sequence ( n ) n∈N such that I n (t) converges almost surely to I(t) and n → 0 (see Point 3 below).

2. Second, we show that I (t) converges almost surely to 0, uniformly for t ∈ [0, T ] (see Point 4 below).

2.

Suppose that X has a finite variation, writing X (u+ )∧t -X u = (u+ )∧t u dX s and using Fubini's theorem yield to:

I (t) -I(t) = t 0 1 s (s-) + H u du -H s dX s , = t 0 1 s (s-) + (H u -H s )du dX s - t∧ 0 -s H s dX s .
Using the Hölder property (1.3) (in the first integral) and the fact that H is bounded by a constant (in the second integral), we have for all t ∈ [0, T ]:

|I (t) -I(t)| T 0 1 s (s-) + C H |u -s| α du d|X| s + 0 -s C d|X| s C H α |X| T + C(|X| -|X| 0 ). (2.1)
Consequently, I (t) -I(t) converges almost surely to 0, as → 0, uniformly on any compact set in time.

Remark 2.1 Note that (2.1) implies that :

sup 0≤t≤T t 0 H s X (s+ )∧t -X s ds - t 0 H s dX s ≤ C α
when (H t ) is α-Hölder continuous and X has finite variation.

3.

In the two next points, X is a continuous martingale. We proceed as in step 2 above: observing that X (u+ )∧t -X u =

(u+ )∧t u dX s and using Fubini's stochastic theorem come to

I (t) -I(t) = t 0 1 s (s-) + H u du -H s dX s . (2.2) Thus, (I (t) -I(t)) t∈[0,T ] is a continuous local martingale. Moreover, E(< I -I > t ) is bounded since H and < X > are bounded on [0, T ]. Let us introduce p = 2(1-α) α 2
+ 1. This explicit expression of p in terms of α will be used later at the end of Point 4. Burkholder-Davis-Gundy inequalities give:

E sup t∈[0,T ] |I (t) -I(t)| p c p E   T 0 1 s (s-) + H u du -H s 2 d < X > s p 2   .
The Hölder property (1.3) implies that:

1 s (s-) + H u du -H s 1 s s- |H u -H s | du C H α , s, 1 s (s-) + H u du -H s 1 s 0 |H u -H s | du + -s |H s | C α , s < . a) Suppose that in (1.3), C H ≤ C for some C. Consequently, sup 0≤s≤T 1 s (s-) + H u du -H s ≤ C α (2.3) and E sup t∈[0,T ] |I (t) -I(t)| p C αp E[< X > T ] p 2 C αp .
Then, for any δ > 0, Markov inequality leads to :

P sup t∈[0,T ] |I (t) -I(t)| > δ C αp δ p . (2.4)
Let us now define ( n ) n∈N by n = n -2 pα for all n > 0. Replacing by n in (2.4) comes to:

P sup t∈[0,T ] |I n (t) -I(t)| > δ C δ p n -2 . Since ∞ n=1 n -2 < ∞,
|Y u -Y v | ≤ Lip(Y, t)|u -v| β , u, v ∈ [0, t].
Proof of Lemma 2.2. Set :

Lip(Y, t) := sup 0≤u,v≤t | Y (u, v)|, t ≥ 0 where Y (u, v) := Y u -Y v |u -v| β when u = v and 0 otherwise.
Lemma 2.2 follows from the continuity of Y .

For all

∈]0, 1[, let n = n( ) denote the integer such that ∈] n+1 , n ].
Then, we decompose I (t) -I(t) as follows:

I (t) -I(t) = (I (t) -I n (t)) + (I n (t) -I(t)).
(2.5) gives the almost sure convergence of I n (t) to I(t), uniformly on [0, T ]. Therefore, the a.s convergence of I (t) -I(t) to 0 , uniformly on [0, T ], will be obtained as soon as I (t) -I n (t) goes to 0, uniformly on [0, T ].

From the definition of I (t), it is easy to deduce that we have:

I (t) -I n (t) = 1 t 0 H u X (u+ )∧t du - t 0 H u X (u+ n)∧t du + 1 - 1 n t 0 H u (X (u+ n)∧t -X u )du .
The changes of variable either v = u + or v = u + n lead to

I (t) -I n (t) = 1 t+ (H v--H v-n ) X v∧t dv (2.6) + n - n t n (H v-n -H v ) X v dv + R (t),
where we gather under the notation R (t) all the remaining terms. Let us observe that R (t) is the sum of terms which are of the form

|R (t)| C n - ∀t ∈ [0, T ]. (2.7)
By Hölder property (1.3), we get

|H v--H v-n | C( n -) α , |H v-n -H v | C H α n . (2.8)
Since X and H are bounded, we can deduce from (2.6), (2.7) and (2.8) that:

|I (t) -I n (t)| C ( n -) α + ( n -) α n n + -n , ∀t ∈ [0, T ]. (2.9)
Using the definition of n , easy calculations lead to :

n - Cn -1 , ( n -) α Cn 2(1-α) pα -α , ( n -) α n n n -2 p -1+ 2 pα n 2(1-α) pα -α .
Note that p = 2(1-α)

α 2
+ 1 implies that 2(1-α) pα -α < 0. As a result, I (t) -I n (t) goes to 0 a.s, uniformly on [0, T ], as → 0.

Remark 2.3 Let (H t ) be an progressively measurable process. Suppose for simplicity that (X t ) is a local semimartingale. Let ( n ) denote a sequence of decreasing positive numbers converging to 0 as n → ∞. Applying Theorem 2 in [START_REF] Karandikar | On almost sure convergence results in stochastic calculus[END_REF] to (2.2) gives the a.s. convergence of Note that inequality (2.9) permit to prove the a.s. of I n (u) as soon as

sup 0≤u≤T I n (u) -I (u) to 0 as n → ∞, provided that n≥1 sup 0≤u≤T H u - 1 n u (u-n)+ H r dr 2 < ∞, a.s. ( 2
lim n→∞ ( n -) α = lim n→∞ ( n -) α n n = lim n→∞ -n = 0.
Since varies in [ n+1 , n ], then

( n -) α ≤ ( n -n+1 ) α n+1 .
It is easy to prove that

( n -n+1 ) α n+1 ∼ ρ α n (1+ρ)α-ρ , n → ∞.
Therefore ρ has to be chosen such that

(1 + ρ)α -ρ > 0, i.e. ρ < α 1 -α . Recall that ρ > 1/α, then 1 α < α 1 -α . This condition is equivalent to α > α 0 := √ 5 -1 2
. This inequality is not necessarily satisfied since it is only supposed that α belongs to ]0, 1[. Finally, our Theorem 1.2 is not a consequence of Theorem 2 of [START_REF] Karandikar | On almost sure convergence results in stochastic calculus[END_REF].

5.

In this item X is supposed to be a locally Hölder continuous semimartingale. Note that replacing X by X -X 0 does not change (1.5). Therefore we may suppose that X 0 = 0.

It is clear that

1 t 0 (X (u+ )∧t -X u ) 2 du equals 1 t 0 X 2 (u+ )∧t du - t 0 X 2 u du -2 t 0 X u (X (u+ )∧t -X u )du .
Making the change of variable v = u + in the first integral, we easily get :

1 t 0 (X (u+ )∧t -X u ) 2 du = X 2 t - 1 t∧ 0 X 2 v dv - 2 t 0 X u (X (u+ )∧t -X u )du.
Since X is continuous, 1 t∧ 0 X 2 v dv tends to 0 a.s, uniformly on [0, T ]. Therefore, it can be deduced from Theorem 1.2 :

lim →0 1 t 0 (X (u+ )∧t -X u ) 2 du = X 2 t -2 t 0 X u dX u (a.s.).
Itô 's formula implies that the right-hand side of the above identity equals to < X > t .

Replacing (u + ) ∧ t by u + in either (1.5) or (1.6) does not change the limit. Then, identity (1.5) may be interpreted as follows : the measures 1 (X u+ -X u ) 2 du converges a.s. to the measure d < X > u . That implies the a.s. convergence of

1 t 0 K u (X (u+ )∧t -X u ) 2 du to t 0 K u d < X > u ,
for any continuous process K.

3 Proof of Theorem 1.4

Recall that W (t) and G (t) are defined by (1.8). We study the convergence in distribution of the two dimensional process (W (t), B t ), as → 0. First, we determine the limit in law of W (t). In Point 1 we demonstrate preliminary results. Then, we prove the convergence of the moments of W (t) in Point 2. By the method of moments, the convergence in law of W (t) for a fixed time is proven in Point 3. We deduce the finite-dimensionnal convergence in Point 4. Finally, Kolmogorov criterion concludes the proof in Point 5. Then, we briefly sketch in Point 6 the proof of the joint convergence of (W (t)) t 0 and (B t ) t 0 . The approach is close to the one of (W (t)) t 0 .

1. We begin by calculating the moments of W (t) and G (u). We denote by L = the equality in law.

Lemma 3.1 E |G (u)| 2 = (u∧ ) 3 3 σ 2 . Moreover, for all k ∈ N, there exists a constant m k such that E |G (u)| k m k , ∀u 0, > 0.
Proof. First, we apply the change of variable s = u -(u ∧ )r in (1.8). Then, using the identity

(B u -B u-v ; 0 v u) L = (B v ; 0 v u)
and the scaling property of B, we get

G (u) L = (u ∧ ) √ u ∧ √ 1 0 B r dr.
E |G (u)| k = (u ∧ ) 3k 2 3k 2 σ k E |N | k . (3.1) Taking k = 2 gives E |G (u)| 2 = (t∧ ) 3 3 σ 2 . Using u ∧ and (3.1), we get E[|G (u)| k ] m k with m k = σ k E |N | k . Lemma 3.2 For all k 2, there exists a constant C(k) such that ∀t 0, E |W (t)| k C(k) t k 2 .
Moreover, for k = 2, we have

E W (u) -W ((u -) + ) 2 σ 2 , ∀u 0.
Proof. The Burkhölder-Davis-Gundy inequality and (1.8) give

E |W (t)| k c(k)E t 0 (G (u)) 2 du k 2
.

Then, Jensen inequality implies:

E t 0 (G (u)) 2 du k 2 t k 2 -1 E t 0 |G (u)| k du .
Finaly, applying Lemma 3.1 comes to

E |W (t)| k c(k)m k t k 2 .
The case k = 2 can be easily treated via (1.8) and Lemma 3.1:

E W (u) -W ((u -) + ) 2 = u (u-) + E (G (v)) 2 dv, = u (u-) + σ 2 (v ∧ ) 3 3 dv σ 2 .

2.

Let us now study the convergence of the moments of W (t).

Proposition 3.3 lim →0 E (W (t)) 2n = E (σW t ) 2n , ∀n ∈ N, t 0. ( 3.2)
Proof. a) We prove Proposition 3.3 by induction on n 1.

For n = 1, from Lemma 3.1, we have:

E (W (t)) 2 = t 0 E (G (u)) 2 du = t 0 σ 2 (u ∧ ) 3 3 du.
Then, E [(W (t)) 2 ] converges to

σ 2 t = E[(σW t ) 2 ].
Let us suppose that (3.2) holds. First, we apply Itô's formula to (W (t)) 2n+2 . Second, taking the expectation reduces to 0 the martingale part. Finally, we get

E (W (t)) 2n+2 = (2n + 2)(2n + 1) 2 t 0 E (W (u)) 2n (G (u)) 2 du. (3.3) b)
We admit for a while that

E (W (u)) 2n (G (u)) 2 -→ σ 2 E (σW u ) 2n , ∀u 0. (3.4)
Using Cauchy-Schwarz inequality and Lemmas 3.1, 3.2 give:

E (W (u)) 2n (G (u)) 2 E (W (u)) 4n E (G (u)) 4 C(4n)u 2n m 4 C(4n)m 4 u n .
Consequently, we may apply Lebesgue's theorem to (3.3), we have

lim →0 E (W (t)) 2n+2 = (2n + 2)(2n + 1) 2 σ 2 t 0 E (σW u ) 2n du, = (2n + 2)(2n + 1) 2 σ 2n+2 t 0 u n (2n)! n! 2 n du, = (2n + 2)! (n + 1)! 2 n+1 (σ √ t) 2n+2 = E (σW t ) 2n+2 .
c) We have now to prove (3.4). If u = 0, E (W (0)) 2n (G (0)) 2 = 0 = σ 2 E (σW 0 ) 2n . If u > 0, it is clear that:

E (W (u)) 2n (G (u)) 2 = E W ((u -) + ) 2n (G (u)) 2 + ξ (u), (3.5)
where

ξ (u) = E (W (u)) 2n -W ((u -) + ) 2n (G (u)) 2 .
Since G (u) is independent from F (u-) + , we have

E W ((u -) + ) 2n (G (u)) 2 = E W ((u -) + ) 2n E (G (u)) 2 .
Finally, plugging the identity above in (3.5) gives:

E (W (u)) 2n (G (u)) 2 = E (W (u)) 2n E (G (u)) 2 + ξ (u) + ξ (u), where ξ (u) = E W ((u -) + ) 2n -(W (u)) 2n E (G (u)) 2 .
Lemma 3.1 implies that E (G (u)) 2 tends to σ 2 as → 0. The recurrence hypothesis implies that E (W (u)) 2n converges to E (σW u ) 2n as → 0. It remains to prove that ξ (u) and ξ (u) tend to 0 to conclude the proof.

The identity a 2n -b 2n = (a -b) 2n-1 k=0 a k b 2n-1-k implies that ξ (u) is equal to the sum 2n-1 k=0 S k ( , u), where

S k ( , u) = E W (u) -W ((u -) + ) (G (u)) 2 (W (u)) k (W ((u -) + )) 2n-1-k .
Applying four times the Cauchy-Schwarz inequality yields to:

|S k ( , u)| E W (u) -W ((u -) + ) 2 1 2 E (G (u)) 8 1 4 × E(W (u)) 8k 1 8 E(W ((u -) + )) 16n-8-8k 1 8 .
Lemmas 3.1 and 3.2 lead to

|S k ( , u)| C(k)T n-1 2 √ , ∀u ∈ [0, T ].
Consequently, ξ (u) tends to 0 as → 0. Using the same method, it is easy to prove that ξ (u) tends to 0 as → 0.

3. From Proposition 3.3, it easy to deduce the convergence in law of W (t) (t being fixed).

Proposition 3.4 For any fixed t 0, W (t) converges in law to σW t , as → 0. Remark 3.5 Using stochastic Fubini theorem we have

W (t) = 1 √ t 0 u 0 v -(u -) + + dB v dB u .
We keep notation given in [START_REF] Nualart | Peccati Central limit theorems for sequences of multiple stochastic integrals[END_REF]. Let us introduce the function f :

f (u, v) := 1 √ v -(u -) + + 1 {0≤v≤u≤t} . Consequently W (t) = J 1 2 (f ). It is easy to prove that f ∆ 2 t 2 := t 0 u 0 f (u, v) 2 dv du = 12 + t - 3 , t > . Therefore lim →0 f ∆ 2 t = σ √ t.
Proposition 3 in [START_REF] Nualart | Peccati Central limit theorems for sequences of multiple stochastic integrals[END_REF] ensures that W (t) converges in distribution to σW t , as → 0 if and only if Let us recall the method of moments.

lim →0 [0,t] 2 F (s 1 , s 2 ) 2 ds 1 ds 2 = 0 (3.
Proposition 3.6 Let X, (X n ) n∈N be r.v's such that E(|X| k ) < ∞, E(|X n | k ) < ∞, ∀k, n ∈ N and lim k→∞ [E(X 2k )] 1 2k 2k < ∞. (3.7) If for all k ∈ N, lim n→∞ E(X k n ) = E(X k ), then X n converges in law to X as n → ∞.
Proof of Proposition 3.4. Let t 0 be a fixed time. The odd moments of W (t) are null. By Proposition 3.3, the even moments of W (t) tends to σW t . Since σW t is a Gaussian r.v. with variance σ √ t, it is easy to check that (3.7) holds. As a result, W (t) converges in law to σW t .

4.

Next, we prove the finite-dimensionnal convergence.

Proposition 3.7 Let 0 < t 1 < t 2 < • • • < t n .
Then, (W (t 1 ), . . . , W (t n )) converges in law to (σW t 1 , . . . , σW tn ), as → 0.

Proof. We take n = 2 for simplicity. We consider 0 < t 1 < t 2 and ∈ ]0, t 1 ∧ (t 2 -t 1 )[. Since t 1 > , note that (u -) + = u -for u ∈ [t 1 , t 2 ]. We begin with the decomposition:

W (t 2 ) = W (t 1 ) + 1 √ t 2 t 1 + u u- (B u -B s )ds dB u + R 1 (t 1 , t 2 ),
where

R 1 (t 1 , t 2 ) = 1 √ t 1 + t 1 u u-(B u -B s )ds dB u . Let us note that W (t 1 ) is independent from 1 √ t 2 t 1 + u u-(B u -B s )ds dB u . Let us introduce B t = B t+t 1 -B t 1 , t 0. B is a standard Brownian motion.
The changes of variables u = t 1 +v and r = s-t 1 in

t 2 t 1 + u u-(B u -B s )ds dB u leads to W (t 2 ) = W (t 1 ) + Θ (t 1 , t 2 ) + R 2 (t 1 , t 2 ) + R 1 (t 1 , t 2 ), (3.8)
where

Θ (t 1 , t 2 ) = 1 √ t 2 -t 1 0 v (v-) + (B v -B r )dr dB v , R 2 (t 1 , t 2 ) = 1 √ 0 v 0 (B v -B r )dr dB v .
Straightforward calculation shows that E (R

5.

We end the proof of the convergence in law of the process (W (t)) t 0 by showing that the family of the laws of (W (t)) t 0 is tight as ∈]0, 1].

Lemma 3.8 There exists a constant K such that

E |W (t) -W (s)| 4 K|t -s| 2 , 0 s t, > 0.
Proof. Applying Burkhölder-Davis-Gundy inequality, we obtain:

E |W (t) -W (s)| 4 cE t s (G (u)) 2 du 2 c(t-s) t s E (G (u)) 4 du. Using Lemma 3.1, we get E |W (t) -W (s)| 4
c m 4 (t -s) 2 and ends the proof (see Kolmogorov Criterion in Section XIII-1 of [START_REF] Revuz | of Grundlehren der Mathematischen Wissenschaften[END_REF]).

6.

To prove the joint convergence of (W (t), B t ) t 0 to (σW t , B t ) t 0 , we mimick the approach developed in Points 1-5 above.

6.a. Convergence (W (t), B t ) to (σW t , B t ), t being fixed. First, we prove that lim →0 E(W p (t)B q t ) = E((σW t ) p B q t ), p, q ∈ N.

(3.9) Let us note that the limit is null when either p or q is odd.

Using Itô's formula, we get

E [(W (t)) p B q t ] = p(p -1) 2 α 1 (t, ) + q(q -1) 2 α 2 (t, ) + pqα 3 (t, ),
where

α 1 (t, ) = t 0 E (W (u)) p-2 B q u (G (u)) 2 du, α 2 (t, ) = t 0 E (W (u)) p B q-2 u du, α 3 (t, ) = t 0 E (W (u)) p-1 B q-1 u G (u) du.
To demonstrate (3.9), we proceed by induction on q, then by induction on p, q being fixed. First, we apply (3.9) with q -2 instead of q, then we have directly:

lim →0 α 2 (t, ) = t 0 E [(σW u ) p ] E B q-2 u du.
As for α 1 (t, ), we write

(W (u)) p-2 = (W (u)) p-2 -W ((u -) + ) p-2 + W ((u -) + ) p-2 B q u = B q u -B q (u-) + + B q (u-) + .
We proceed similarly with α 3 (t, ). Reasoning as in Point 2 and using the two previous identities, we can prove:

lim →0 α 1 (t, ) = σ 2 t 0 E (σW u ) p-2 E [B q u ] du and lim →0 α 3 (t, ) = 0.
Consequently, when either p or q is odd, then lim →0 α i (t, ) = 0, (i = 1, 2) and therefore: lim

→0 E(W p (t)B q t ) = 0 = E((σW t ) p B q t ).
It remains to determine the limit in the case where p and q are even. Let us denote p = 2p and q = 2q . Then we have lim

→0 α 1 (t, ) = t 0 σ 2 (p -2)! 2 p -1 (p -1)! u p -1 σ p-2 q! 2 q (q )! u q du = (p -2)! q! 2 p +q -1 (p -1)! (q )! (p + q ) σ p t p +q , lim →0 α 2 (t, ) = t 0 p! 2 p (p )! σ p u p (q -2)! 2 q -1 (q -1)! u q -1 du = p! (q -2)! 2 p +q -1 (p )! (q -1)! (p + q ) σ p t p +q .
Then, it is easy to deduce

lim →0 E [(W (t)) p B q t ] = p! 2 p (p )! σ p t p q! 2 q (q )! t q = E [(σW t ) p ] E [B q t ] .
Next, we use a two dimensional version of the method of moments: Proposition 3.9 Let X, Y, (Y n ) n∈N (X n ) n∈N be r.v. whose moments are finite. Let us suppose that X and Y satisfy (3.7) and that ∀p, q ∈ N,

lim n→∞ E(X p n Y q n ) = E(X p Y q ). Then, (X n , Y n ) converges in law to (X, Y ) as n → ∞.
Since W t and B t are Gaussian r.v's, they both satisfy (3.7). Consequently, (W (t), B t ) converges in law to (σW t , B t ) as → 0.

6.b. Finite-dimensional convergence. Let 0 < t 1 < t 2 . We prove that (W (t 1 ), W (t 2 ), B t 1 , B t 2 ) converges in law to (σW t 1 , σW t 2 , B t 1 , B t 2 ). We apply decomposition (3.8) to W (t 2 ). By Point 6.a, (W (t 1 ), B t 1 ) converges in law to (σW t 1 , B t 1 ) and (Θ (t

1 , t 2 ), B t 2 - B t 1 ) converges to (σW t 2 -σW t 1 , B t 2 -B t 1 ). Since (Θ (t 1 , t 2 ), B t 2 -B t 1 ) is independent from (W (t 1 ), B t 1 ), we can conclude that (W (t 1 ), W (t 2 ), B t 1 , B t 2 ) converges in law to (σW t 1 , σW t 2 , B t 1 , B t 2 ).
Consider a predictable, right-continuous with left-limits process (Γ u ) such that : Γ, W converges in distribution to Γ, σW , →

In (4.1), the pair Γ, W is considered as an element of

D [0, T ] × C [0, T ] . Proposition 4.1 1. Let F : Ω × C [0, T ] , σ(B u , u ≥ 0) ⊗ B c [0, T ] →
R be a bounded an measurable map and such that for any ω, F (ω, •) is continuous. Then :

lim →0 E F (•, W ) = E F (•, σW ) . (4.2)
2. Under (4.1), the process

t 0 Γ u dW (u) t 0 converges in distribution to σ t 0 Γ u dW u t 0 as → 0, where (Γ u ) is independent of (W u ).
Proof of Proposition 4.1 1) Denote H the set of σ(B u , u ≥ 0)-measurable and bounded r.v.'s A such that lim

→0 E AΘ(W ) = E AΘ(σW ) = E(A)E Θ(σW ) , (4.3)
where Θ : C [0, T ] → R is continuous and bounded.

It is clear that H is a linear vector space. Let A n , n ≥ 1 be a sequence of elements in H which satisfies a) A n , n ≥ 1 converges uniformly to a bounded element A either b) n → A n is non-decreasing and the limit A is bounded.

Since

E AΘ(W ) -E AΘ(σW ) = E (A -A n )Θ(W ) +E A n Θ(W ) -E A n Θ(σW ) E (A n -A)Θ(σW )
we have

E AΘ(W ) -E AΘ(σW ) ≤ CE |A-A n | + E A n Θ(W ) -E A n Θ(σW ) .
Consequently, A ∈ H.

Consider the set C of r.v.'s of the type f (B t 1 , • • • , B tn ) where f is continuous and bounded. Theorem 1.4 implies that C ⊂ H. Then, (4.3) is direct consequence of Theorem T20 p 28 in [START_REF] Meyer | Probabilités et potentiel[END_REF].

According to Proposition 2.4 in [START_REF] Jacod | Sur un type de convergence intermédiaire entre la convergence en loi et la convergence en probabilité[END_REF], relations (4.3) and (4.2) are equivalent.

2) Denote F 0 : D [0, T ] × C [0, T ] → R a bounded and continuous function. Property (4.1) is a direct consequence of item 1 of Proposition 4.1 applied with :

F (ω, w) := F 0 (Γ s (ω), 0 ≤ s ≤ T ), w , w ∈ C [0, T ] .
Recall that W is a continuous martingale, which converges in distribution to σW as → 0. Then, by Proposition 3.2 of [START_REF] Jakubowski | Convergence en loi des suites d'intégrales stochastiques sur l'espace D 1 de Skorokhod[END_REF], W satisfies the condition of uniform tightness. Consequently, from Theorem 5.1 of [START_REF] Jakubowski | Convergence en loi des suites d'intégrales stochastiques sur l'espace D 1 de Skorokhod[END_REF] and (4.1), we can deduce that for any predictable, right-continuous with left-limits process Γ,

• 0 Γ u dW (u) converges in distribution to σ • 0 Γ u dW (u).
Remark 4.2 1. The convergence in item 1 of Proposition 4.1 corresponds to the stable convergence, cf [START_REF] Jacod | Sur un type de convergence intermédiaire entre la convergence en loi et la convergence en probabilité[END_REF].

2. According to relation (2.2), we have

∆ (H, t) = 1 √ t 0 1 s (s-) + H u du -H s dB s .
Let us apply the general result obtained in [START_REF] Rootzen | Limit distribution for the error in approximations of stochastic integrals[END_REF]. Let ( n ) be a sequence of positive numbers converging to 0 as n → ∞. For any t > 0, suppose : where τ (t) denotes a continuous process and (P ) stands for the convergence in probability.

1 n t 0 1 n s (s-n) + H u du -H s 2 ds (P ) -→ τ (t), n → ∞ (4.
Then, from Theorem 1.2 in [START_REF] Rootzen | Limit distribution for the error in approximations of stochastic integrals[END_REF] we can deduce that

∆ n (H, t), t ≥ 0 (d) -→ W (τ (t)) t ≥ 0 , n → ∞ (4.6)
where (W t ) is a standard Brownian motion independent from τ (t) .

Suppose that (H t ) is of the type

H t = H 0 + t 0 Λ s dB s + V t , where (Λ t )
and (V t ) satisfy the assumptions given in Theorem 1.5. Note that

σ t 0 Λ u dW u , t ≥ 0 (d) = W σ 2 t 0 Λ 2 u du , t ≥ 0 .
Therefore (4.6) suggests to prove (4.4) with

τ (t) := σ 2 t 0 Λ 2 u du, t ≥ 0.
We have tried without any success to directly prove (4.4) and (4.5). In the particular case H t = B t , the calculations are tractable. Theorem 1.2 in [START_REF] Rootzen | Limit distribution for the error in approximations of stochastic integrals[END_REF] may be applied : ∆ n (B, t), t ≥ 0 converges in distribution to (σW t , t ≥ 0), as n → ∞. However, this result is not sufficient to have the convergence of ∆ n (H, t), t ≥ 0 since we need the convergence of ∆ n (B, t), B t and the convergence of the previous pair of processes is not given by Theorem 1.2 in [START_REF] Rootzen | Limit distribution for the error in approximations of stochastic integrals[END_REF].

2. Some preliminary results related to the proof of Theorem 1.5.

Lemma 4.3 Let ξ (t), t ≥ 0 be a family of processes. Suppose there exists a increasing sequence (T n ) n≥1 of random times such that T n ↑ ∞ as n → ∞ and for any n ≥ 1, ξ (t ∧ T n ), t ≥ 0 converges in the ucp sense to 0, as → 0.

Then ξ (t), t ≥ 0 converges in the ucp sense to 0, as → 0, i.e. for any T > 0, sup 0≤s≤T |ξ (s)| → 0 in probability as → 0.

Lemma 4.4 Denote (K t ) an progressively measurable process which is rightcontinuous at 0, K 0 = 0 and locally bounded. Set :

R 1 (K, t) := 1 √ t∧ 0 K s s -1 dB s , t ≥ 0. (4.7)
Then R 1 (K, t), t ≥ 0 converges in the ucp sense to 0.

Proof of Lemma 4.4. Since (K t ) is locally bounded there exists a increasing sequence of stopping times (T n ) n≥1 such that T n ↑ ∞ as n → ∞ and |K(t ∧ T n )| ≤ n, for any t ≥ 0. Then, according to Lemma 4.3 it is sufficient to prove that R 1 (K, t), t ≥ 0 converges in the ucp sense to 0 when (K t ) is bounded.

In that case, using Doob's inequality we get :

E sup t∈[0,T ] R 1 (K, t) 2 ≤ C E 0 K(s) 2 s -1 2 ds ≤ C sup 0≤s≤ E K(s) 2
where T > 0.

Recall that (K s ) is bounded, s → K(s) is right continuous at 0, K(0) = 0, then the dominated convergence theorem implies that lim

→0 sup 0≤s≤ E K(s) 2 = 0.
This proves that sup

t∈[0,T ] R 1 (K, t) goes to 0 in L 2 (Ω).
Note that under (1.9

(B (s+ )∧t -B s ) 2 = 2 (s+ )∧t s (B u -B s )dB u + (s + ) ∧ t -s.

Reporting in ∆

(2) (K, t) and applying stochastic Fubini's theorem lead to

∆ (2) (K, t) = 2 t 0 K u dW (u) + R 1 (t) + R 2 (t),
where

R 1 (t) := 2 √ t 0 u (u-) + (K s -K u )(B u -B s )ds dB u R 2 (t) := 1 √ t (t-) + K s (t -s -)ds.
Note that Proposition 4.1 (with Γ = K) ensures the convergence in distribution of

• 0 K u dW (u) to σ • 0 K u dW (u). Since s → K s is locally bounded, then lim →0 sup t∈[0,T ]
|R 2 (t)| = 0 a.s.

To prove that R 1 (ucp) → 0, we may assume that K is bounded (cf Lemma 4.3). Using the Cauchy-Schwarz and Doob inequalities, we obtain successively :

E sup 0≤t≤T (R 1 ) 2 ≤ C 3 T 0 E u (u-) + (K s -K u )(B s -B u )ds 2 du ≤ C 2 T 0 du u (u-) + E (K s -K u ) 4 E (B s -B u ) 4 ds ≤ C T 0 sup s≤u≤(s+ )∧t E (K s -K u ) 4 ds
Since K is bounded and right-continuous, then the term in the right-hand side of the above inequality goes to 0 as → 0.

4. Proof of Point (1) of Theorem 1.5. Using (4.8) we have :

∆ (H 0 , t) = H 0 ∆ (1, t) + R 1 (Φ, t) = H 0 R 1 (Φ, t) = H 0 Φ(0)N + H 0 R 1 Φ -Φ(0), t
where < t and

N := 1 √ 0 u -1 dB u , < t.
The r.v N has a centered Gaussian distribution, with variance

E(N 2 ) = 0 u -1 2 du = 1 3 = σ. According to Lemma 4.4, R 1 Φ -Φ(0), • (ucp)
→ 0 as → 0.

5. Proof of Point (2) of Theorem 1.5. Since (H t ) = (V t ) is continuous and

V 0 = 0 then, Lemma 4.4 applied with K = ΦH implies that R 1 (ΦH, •) (ucp)
→ 0 as → 0.

Let T > 0. According to Lemmas 4.3 and 2.2, we may suppose that Φ is bounded and :

|V s -V u | ≤ C|u -v| β , u, v ∈ [0, T ], β > 1 2 .
As a result,

1 √ u (u-) + (V s -V u )ds 1 √ u u- C |s -u| β ds C β-1 2 and E sup t∈[0,T ] ∆ (V, t) 2 ≤ C 2β-1 .
Using (4.8), item 2 of Theorem 1.5 follows.

6. Proof of Point (3) of Theorem 1.5.

a) Recall that M t = t 0 Λ r dB r and ∆ (M, t) = - 1 √ t 0 u (u-) + (M u -M s )ds Φ(u)dB u .
Let s < u, we have

M u -M s = Λ (u-) + (B u -B s ) + u s Λ r -Λ (u-) + dB r .
Using (1.8) we get :

∆ (M, t) = - t 0 Λ u -Φ(u)dW (u) + R 2 (t) + R 3 (t), (4.10)
where

R 2 (t) := - t 0 Λ (u-) + -Λ u -Φ(u)dW (u) and R 3 (t) = - 1 √ t 0 u (u-) + (r -(u -) + )(Λ r -Λ (u-) + )dB r Φ(u)dB u .
b) Suppose for a while that R 2 and R 3 converge in the ucp sense to 0, as → 0. Then, Proposition 4.1 with Γ = Λ implies that the convergence of ∆ (H, •) to

σ • 0 Λ u -Φ(u)dW u . Note that • 0 Λ u Φ(u)dW u = • 0 Λ u -Φ(u)dW u a.s.
c) Let us prove that R 3 converge in the ucp sense to 0. The proof related to R 2 is similar and easier; it is left to the reader. From Lemma 4.3, we can suppose that Λ u , 0 ≤ u ≤ T and Φ(u), 0 ≤ u ≤ T are bounded. Then, using Burkholder-Davies-Gundy and Hölder inequalities we get : Using the dominated convergence theorem and the fact that t → Λ t has leftlimits we can conclude that the right-hand side in the above inequality goes to 0 as → 0. Consequently, sup 0≤t≤T |R 3 (t)| goes to 0 in L 2 (Ω).

E sup 0≤t≤T R 3 (t)
→ 0, as → 0. We claim that R 3 has the same behavior. By localization and Lemma 4.3 we may suppose that Φ is bounded. Using Doob's and Hölder inequalities we obtain :

E sup 0≤t≤T R 3 (t) 2 ≤
Cδ(h , ) It can be proved that lim →0 δ(φ, ) = 0 as soon as φ is subexponential. As a result, sup t≤T R 3 (t) goes to 0 in L 2 (Ω) as → 0.

8. Proof of Theorem 1.7

a) The a.s. converges comes from the continuity of t → X t and the identity ∆ (H, t) = h 0 Φ(0)G 0 ( ) + R 1 Φ -Φ(0), , 0 < t ≤ a 1 , 0 < < t where R 1 Φ -Φ(0), has been defined by (4.7) and

G 0 ( ) := 1 √ 0 s -1 dB s .
More generally when t ∈]a i , a i+1 ], < (t -a i ) ∧ (a i -a i-1 ) and i ≥ 1, we have

∆ (H, t) = ∆ (H, a i ) + (h i -h i-1 ) Φ(a i )G i ( ) + R 1 with G i ( ) := 1 √ a i + a i s -a i -1 dB s R 1 := 1 √ a i + a i s -a i -1 Φ(s) -Φ(a i ) dB s
As a result for any t ∈]a i , a i+1 ] we have :

∆ (H, t) = h 0 Φ(0)G 0 ( ) + h 1 -h 0 Φ(a 1 )G 1 ( ) + • • • + h i -h i-1 Φ(a i )G i ( )

+ h i -h i-1 R 1
where < (a 1 -a 0 ) ∧ • • • ∧ (a i -a i-1 ) ∧ (t -a i ). (4.11) Recall that Φ has been supposed to be right-continuous at a i , then Lemma 4.4 may be applied : R 1 (ucp) → 0, as → 0. As a result, the term R 1 gives no contribution to the limit of ∆ (H, •).

Note that G

Since 1 0

 1 B r dr L = σN , where σ 2 = 1/3 and N is a standard gaussian r.v, we obtain

6 ) where F (s 1 , s 2 ) := t 0 f

 6where10 (u, s 1 )f (u, s 2 ) + f (s 1 , u)f (s 2 , u) du. Identity (3.6) can be shown by tedious calculations. This gives a new proof of Proposition 3.4.

2 ×Φ

 2 ) + r -(u -) + (Λ r -Λ (u-) + )dB r r -(u -) + (Λ r -Λ (u-) + )dB r r -(u -) + 2 E (Λ r -Λ (u-) + ) ) + ≤r<u E (Λ r -Λ (u-) + ) 2 du.

7 . 6 From ( 4 . 8 ) 1 0 1 0 0 hR 3 (

 76481103 Proof of Proposition 1., we have :∆ h(B), t = ∆ h(B), t + R 1 h(B)s ) -h(B u ) ds Φ(u)dB u . Since : h(B s ) -h(B u ) = (B s -B u ) h B u + θ(B s -B u ) dθ = (B s -B u )h (B u ) +(B s -B u ) h B u + θ(B s -B u ) -h (B u ) dθ then, ∆ h(B), t = -t (B u )Φ(u)dW (u) + R 1 h(B)Φ, t + R 3 (t)where W (u) is the process defined by(1.8) and u + θ(B s -B u ) -h (B u ) dθ ds Φ(u)dB u . Using Proposition 4.1 (with Γ = h (B)Φ) implies that • 0 h (B u )Φ(u)dW (u), converges in distribution to σ • 0 h (B u )Φ(u)dW (u), as → 0. Since h(0) = 0,Lemma 4.4 may be applied : R 1 h(B)Φ, •

E

  [B s -B u ] 4 ds du ≤ Cδ(h , ) where δ(φ, ) := sup 0≤θ≤1,0≤u-≤s≤u≤T E φ B u + θ(B s -B u ) -φ(B u ) 4 .

  i ( ) is a Gaussian r.v. with variance σ 2 = 1/3 and under (4.11) the r.v.'s G 0 ( ), • • • , G i ( ) are independent and lim →0 E B s G i ( ) = 0, ∀ s ≥ 0. Item 2 of Theorem 1.7 follows.

  2. M t is a Brownian martingale, i.e. M t =

	t
	Λ s dB s , where (Λ t ) is pro-
	0 gressively measurable, locally bounded and is right-continuous with left-
	limits.
	3. V is a continuous process, which is Hölder continuous with order α > 1/2,
	vanishing at time 0.
	Note that if V t =

t 0 v s ds, where (v t ) t 0 is progressively measurable and locally bounded, then above condition 3 holds with α = 1 and in that case, (H t ) is a semimartingale.

  4, the limit of ∆ (V, t) equals (σW t ) and is not null. It is likely too strong to suppose that (H t ) is a semimartingale : we can show (see Proposition 1.6 below) that ∆ (H, t), t ≥ 0 converges in distribution where H t = h(B t ) and h is only supposed to be of class C 1 . Note that in this case (H t ) is a Dirichlet process. However, if (H t ) is a stepwise and progressively measurable process then, we have the convergence in law of the finite dimensional distributions of ∆ (H, t), t ≥ 0 but this family of processes does not converge in distribution (see Theorem 1.7 below). Let (a i ) i∈N be an increasing sequence of real numbers which satisfies a 0 = 0 and a n → ∞. Let h, (h i ) i∈N be r.v.'s such that h i is F a imeasurable, h is F 0 -measurable. Let H be the progressively measurable and stepwise process:

	Next, we consider the convergence of ∆ (h(B), •) for a large class of functions
	h. A function h : R → R is said to subexponential if there exist C 1 , C 2 > 0
	such that
			|h(x)| ≤ C 1 e C 2 |x| , x ∈ R.	(1.10)
	Proposition 1.6 Suppose that h is a function of class C 1 such that h(0) = 0
	and h is subexponential. Then, ∆ (h(B), t), t ≥ 0 converges in distribution
		t
	as → 0 to σ	h (B s )Φ(s)dW s , t ≥ 0 .
		0
	According to Exercise 3.13, chap. V in [8] we have :
			t
		h(B t ) = E h(B t ) +	H(t, s)dB s , t ≥ 0
			0
	where H(t, s) = ϕ(t, s, B s ) and ϕ(t, s, x) := E h (x + B t-s ) .
	Consequently H(t, s), 0 ≤ s ≤ t is progressively measurable but depends on
	t, therefore item 3 of Theorem 1.5 cannot be applied.
	c) We now focus on the case where (H t ) is a stepwise and progressively mea-surable process. We study the a.s. convergence of 1 • H u X (u+ )∧t -X u du
		•	0
	towards	H u dX u and the convergence in distribution of ∆ (H, •) as goes
	to 0.	0
	Theorem 1.7

  the Borel-Cantelli lemma implies that:

	lim n→∞	t∈[0,T ] sup	|I n (t) -I(t)| = 0, a.s.	(2.5)

b) Using localization and Lemma 2.2 below we can reduce to the case where C H is bounded by a constant. That implies (2.5). Lemma 2.2 Let (Y t ) be an adapted process and locally Hölder continuous with index α. Then for any β ∈]0, α[ there exists a continuous and adapted process Lip(Y, t) such that

  .10) To simplify the discussion suppose that n = 1/n ρ , with ρ > 0. Obviously, the previous sum is finite if and only if ρα > 1.

	Suppose that (H t ) is locally Hölder with index α. According to (2.3), relation
	(2.10) holds if	α n < ∞.
	n≥1

  X s dswhere a i ≤ t ≤ a i+1 and i ≥ 0. b) Let us deal the convergence in distribution. Recall that we supposed that X = B. Using the definition of ∆ (H, t), identity (2.2) and easy calculations we get :

				+h i	1 t+	X s ds -	1 a i +
					t				a i
	1 t	H s X s+ -X s ds =	i-1	h j	1 a j+1 +	X s ds -	1 a j +	X s ds
	0		j=0		a j+1				a j

Proofs of Theorems 1.5, 1.7 and Propositions 1.6, 1.8 1. Convergence in distribution of a family of stochastic integrals with respect to W . Denote C [0, T ] the set of real valued and continuous functions defined on [0, T ]. C [0, T ] equipped with the uniform norm is a Banach space. Set B c [0, T ] the Borel σ-field on C [0, T ] . Let D [0, T ] be the space of rightcontinuous functions with left-limits equipped with the Skorokhod topology.