The Ohr HaChaim used to make frequent trips with his talmidim to daven at kivrei Tzaddikim in Yerushalayim. The Chida described one such trip that he himself went on and accompanied the Ohr HaChaim and what he saw the Ohr HaChaim do on that occasion:
“In my youth I merited to travel together with the wondrous holy Chassid, our Master, Rav Chaim ben Attar and the students of his Yeshiva, to travel to daven at the kivrei Tzaddikim in Yerushalayim. When we reached the matzeiva of the Rav, author of the sefer Pri Chodosh, we watch as the Rav [the Ohr HaChaim] remained there alone for some fifteen minutes or more, davening at the kever, and his lips moved as he was talking and we understood that he was asking mechila from the Pri Chodosh that he be forgiven [for Rav Chaim ben Attar, in his sefer Pri To’ar, would rule against him and argue on some of his points] and that all that he did was purely L’shem Shomayim (for the sake of Heaven).” (Shem HaGedolim, Section on Seforim, Entry for Pri To’ar)
